SystemPrincipal Telemetry should avoid profiles with custom userChrome.css and avoid racing with the detection of custom hackery
Categories
(Core :: DOM: Security, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: freddy, Assigned: freddy)
Details
(Whiteboard: [domsecurity-active])
Attachments
(1 file)
We've made two observation through our telemetry:
- We still get pings from profiles that load JS hackery, for which it is really hard to enable enforcement (those privileged scripts often contain remote resources, eval, etc.)
- Some people only load CSS hacks,. without any custom JS.
As a result:
Ad 1: Thus, our checks can only work on the main thread, so we want to hold reporting telemetry in case where the check has yielded a positive result but also only when the check has run at all.
Ad 2: To detect custom privileged CSS, we now introduce a DetectCssHacks
function that probes the toolkit.legacyUserProfileCustomizations.stylesheets
pref and use it before reporting telemetry.
Assignee | ||
Comment 1•3 years ago
|
||
Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60edafe5dcc3 systemprincipal telemetry for userChrome.css profiles (and avoid racing with pref checks) r=ckerschb,tjr
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Backed out for for causing failures on ServoUtils.h:33 and browser_preferences_usage.js. CLOSED TREE
Backout link : https://hg.mozilla.org/integration/autoland/rev/1a2b6b10f00a313eb8d8505dc8fa04f49008ad7a
Push with failures : https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=60edafe5dcc3510cf8df8fae05addd1f81e3622b&selectedTaskRun=TDaSw0qwTvyGkabwmwuJ4Q.0
Failure logs:
ServoUtils.h:33 : https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=60edafe5dcc3510cf8df8fae05addd1f81e3622b&selectedTaskRun=TDaSw0qwTvyGkabwmwuJ4Q.0
browser_preferences_usage.js. : https://treeherder.mozilla.org/logviewer?job_id=352077266&repo=autoland&lineNumber=2494
Assignee | ||
Comment 4•3 years ago
|
||
The backout confirms that we are seeing races with the string-pref check:
browser/base/content/test/performance/browser_preferences_usage.js | general.config.filename should not be accessed more than 40 times. - 412 <= 40 -
I'm not sure how we can ensure that our detection runs only once and at the right time though.
Assignee | ||
Comment 5•3 years ago
|
||
I've made some improvements to make this code less racy and more performant, but I think this test failure you saw was unrelated to my push.
Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb51f3bf786f systemprincipal telemetry for userChrome.css profiles (and avoid racing with pref checks) r=ckerschb,tjr
Comment 7•3 years ago
|
||
bugherder |
Description
•