Closed
Bug 1400139
Opened 7 years ago
Closed 7 years ago
Add telemetry for how often window.content is used from untrusted code
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(3 files)
(deleted),
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
nika
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
nika
:
review+
|
Details | Diff | Splinter Review |
Specifically, the plan is to do the following:
1) Make the property non-enumerable (needs some codegen changes).
2) Add a counter for how often the window resolve hook is run for a property named
"content". This will also trap sets of "content" and "var content", so might
not turn out to be useful unless it's very very low; it's basically an upper
bound on "content" usage.
3) Add a counter for how often the getter is called from untrusted code.
Comment 1•7 years ago
|
||
Since we need this for removing it (bug 1400140), I guess P2 is appropriate.
Priority: -- → P2
Assignee | ||
Comment 2•7 years ago
|
||
Actually, I don't think #2 is at all useful, because we would trigger that resolve hook when setting up the window object itself... I'm going to do the other pieces, though.
I did try to poke at GitHub searching for "content in window" (yes, I checked that it finds other detection code using a similar search, e.g. "scrollX in window"), and don't obviously see anyone using it for sniffing.
Assignee | ||
Comment 3•7 years ago
|
||
MozReview-Commit-ID: 9F0ZNverS63
Attachment #8908946 -
Flags: review?(kyle)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•7 years ago
|
||
MozReview-Commit-ID: LQkEkdG8wKf
Attachment #8908947 -
Flags: review?(michael)
Assignee | ||
Comment 5•7 years ago
|
||
MozReview-Commit-ID: LFMK7lxs46Z
Attachment #8908949 -
Flags: review?(michael)
Updated•7 years ago
|
Attachment #8908946 -
Flags: review?(kyle) → review+
Updated•7 years ago
|
Attachment #8908947 -
Flags: review?(michael) → review+
Comment 6•7 years ago
|
||
Comment on attachment 8908949 [details] [diff] [review]
part 3. Add a use counter when the window.content getter is called from untrusted code
Review of attachment 8908949 [details] [diff] [review]:
-----------------------------------------------------------------
This patch adds a warning and, as far as I can tell, no usage counter, so the commit message is a bit confusing :-/
Attachment #8908949 -
Flags: review?(michael)
Assignee | ||
Comment 7•7 years ago
|
||
Comment on attachment 8908949 [details] [diff] [review]
part 3. Add a use counter when the window.content getter is called from untrusted code
> This patch adds a warning and, as far as I can tell, no usage counter
Everything in nsDeprecatedOperationList.h automatically gets a usage counter. See http://searchfox.org/mozilla-central/rev/6769c4c331c85870ac3e7bf61968db98c16e4777/dom/base/UseCounter.h#29-32 and http://searchfox.org/mozilla-central/rev/6769c4c331c85870ac3e7bf61968db98c16e4777/dom/base/nsDocument.cpp#10543-10546 and so forth.
Attachment #8908949 -
Flags: review?(michael)
Updated•7 years ago
|
Attachment #8908949 -
Flags: review?(michael) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ecbba14b2f3
part 1. Add infrastructure for marking WebIDL interface members as non-enumerable. r=qdot
https://hg.mozilla.org/integration/mozilla-inbound/rev/5bc10c68bbf7
part 2. Make window.content non-enumerable. r=mystor
https://hg.mozilla.org/integration/mozilla-inbound/rev/df23db5d453e
part 3. Add a use counter when the window.content getter is called from untrusted code. r=mystor
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6ecbba14b2f3
https://hg.mozilla.org/mozilla-central/rev/5bc10c68bbf7
https://hg.mozilla.org/mozilla-central/rev/df23db5d453e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•