Round subpixel accuracy of window properties to integers when resistfingerprinting is enabled
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | affected |
People
(Reporter: gk, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [tor 26607][fingerprinting])
Starting with bug 1151421 some window properties give back subpixel accuracy on particular displays. We should make sure to round that to integers when resistfingerprinting is enabled to not give away the information about subpixel-capable display yes/no?
Comment 1•6 years ago
|
||
Downstream: https://trac.torproject.org/projects/tor/ticket/26607 including link for PoC
Updated•6 years ago
|
Comment 2•6 years ago
|
||
This allows to calculate the real window.devicePixelRatio
when privacy.resistFingerprinting
is enabled, which is spoofed to 1 under that setting.
What we observed is that the measured window.scrollY
is always a multiple of 1 / window.devicePixelRatio
, and therefore assume that the scroll is done in physical screen pixels
units which result in these subpixel CSS properties for HiDPI screens.
Would it be feasible/a good idea to make sure scroll does not leak screen DPI (like doing scroll in CSS pixels instead of screen pixels)?
Updated•6 years ago
|
Comment 3•6 years ago
|
||
(In reply to Alex Catarineu from comment #2)
Would it be feasible/a good idea to make sure scroll does not leak screen DPI (like doing scroll in CSS pixels instead of screen pixels)?
Are you looking to round to CSS pixels the amount of scrolling that's actually performed visually, or just the values reported via window.scrollX/Y
?
Comment 4•6 years ago
|
||
It would be the first one. This not only can be read via window.scrollXY
, but also with getBoundingClientRect()
and similar. Even if it was possible to round all these properties, as Tom suggested an attacker could nudge elements until the value changed to recover the original subpixel value.
Comment 5•6 years ago
|
||
(In reply to Alex Catarineu from comment #4)
It would be the first one.
In that case, you'd probably want to perform the rounding here, as part of the adjustment from aPt
to pt
.
However, it's hard to predict what sort of side effects that might have.
Markus, can you think of anything offhand that such rounding would break? Otherwise, try it and see, I guess.
Updated•2 years ago
|
Description
•