CanvasRenderingContext2D::getImageData() could return inconsistent data if canvas randomization is enabled.
Categories
(Core :: Privacy: Anti-Tracking, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox115 | --- | fixed |
People
(Reporter: timhuang, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
Crash Data
Attachments
(1 file)
On the canvas test page, https://arkenfox.github.io/TZP/tests/canvasnoise.html, we will get inconsistent canvas fingerprints between the first and second canvas data extraction. This is because we also change the image buffer of the canvas data when we introduce the random noises. The random noises will cause the noises to be changed at the second extraction.
To fix this issue, we can cache the canvas random key when we calculate the canvas key at the first data extraction and use it further. This can improve the performance as well.
| Assignee | ||
Comment 1•3 years ago
|
||
When introducing the random noises to the image data in
CanvasRenderingContext2D::GetImageDataArray would also alter the actual
image buffer. This will change the random noises every time we call the
function because the random noises is generated according to the image
data. This is undesirable and the random noises should remain the
same in the browsing session with the same canvas.
To fix this issue, we clone the actual image data if canvas randomization is
enabled and introduce noises to the cloned data, which doesn't change
the actual image buffer. So, the random nosies will remain consistent in
a single browser session.
We also fix some minor issues in this patch.
Comment 3•3 years ago
|
||
| bugherder | ||
Comment 5•3 years ago
|
||
Copying crash signatures from duplicate bugs.
Description
•