Skip to content

Commit

Permalink
Bug 1811294: Roll out Pref Sanitization r=smaug
Browse files Browse the repository at this point in the history
1. Ship the Sanitization (currently on in Nightly
     but without crashing) to the trains
2. Enabling crashing in Nightly

#1 will start omitting the preference values in
Content Processes. An affected user will have
their browser behave differently - it will be as
if the preference has no value. So for e.g. the
font preferences, their font customizations will
be gone. If they file a bug about this happening
and an engineer connects the problem to pref
sanitization we could debug the issue and maybe
understand it.

#2 will mean that an affected user (of which
there are currently none we think) will have a
content process crash when they access a
forbidden preference. The crash reason will
contain the name of the preference, and the
stack which would help us better understand
why we crashed.

Differential Revision: https://phabricator.services.mozilla.com/D167287
  • Loading branch information
tomrittervg committed Feb 6, 2023
1 parent f877f8b commit 226a03c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion modules/libpref/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6002,7 +6002,7 @@ struct PrefListEntry {
size_t mLen;
};

// These prefs are not useful in child processes.
// These prefs are not useful in child processes - do not send them
static const PrefListEntry sParentOnlyPrefBranchList[] = {
// Remove prefs with user data
PREF_LIST_ENTRY("datareporting.policy."),
Expand Down Expand Up @@ -6051,6 +6051,9 @@ static const PrefListEntry sParentOnlyPrefBranchList[] = {
PREF_LIST_ENTRY("toolkit.telemetry.previousBuildID"),
};

// These prefs are dynamically-named (i.e. not specified in prefs.js or
// StaticPrefList) and would normally by blocklisted but we allow them through
// anyway, so this override list acts as an allowlist
static const PrefListEntry sDynamicPrefOverrideList[]{
PREF_LIST_ENTRY("apz.subtest"),
PREF_LIST_ENTRY("autoadmin.global_config_url"), // Bug 1780575
Expand Down
4 changes: 2 additions & 2 deletions modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5168,13 +5168,13 @@
# If true, do not send blocklisted preference values to the subprocess
- name: fission.omitBlocklistedPrefsInSubprocesses
type: RelaxedAtomicBool
value: @IS_NIGHTLY_BUILD@
value: true
mirror: always

# If true, crash when a blocklisted preference is accessed in a subprocess
- name: fission.enforceBlocklistedPrefsInSubprocesses
type: RelaxedAtomicBool
value: false
value: @IS_NIGHTLY_BUILD@
mirror: always

#---------------------------------------------------------------------------
Expand Down

0 comments on commit 226a03c

Please sign in to comment.