Closed
Bug 1287863
Opened 9 years ago
Closed 7 years ago
Assertion failure: ok || !(aPresContext && aStyleContext) in [@nsRuleNode::ComputeColor]
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox50 | --- | affected |
People
(Reporter: tsmith, Unassigned)
References
Details
(Keywords: assertion, testcase, Whiteboard: [fuzzblocker])
Attachments
(3 files)
Found with :truber's css-color grammar work while fuzzing canvas.
Assertion failure: ok || !(aPresContext && aStyleContext), at /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/layout/style/nsRuleNode.cpp:10619
Test case:
<canvas id='i0'></canvas>
<script>
var c=document.getElementById('i0').getContext('2d');
c.strokeStyle='-moz-win-mediatext';
//c.fillStyle='-moz-mac-focusring'; // also triggers assertion
</script>
Updated•9 years ago
|
Assignee: nobody → vliu
Comment 1•9 years ago
|
||
Hi David,
About the assertion for '-moz-win-mediatext', I'd tried to enable sUseStandinsForNativeColors to stop the crash. Please see the attached WIP.
The reason why I did this is because I saw Gecko has defined this attribute in [1].
[1]: https://dxr.mozilla.org/mozilla-central/source/widget/nsXPLookAndFeel.cpp#650
Could you please give my any comment if the WIP is not considering anything others? Thanks.
Attachment #8773137 -
Flags: feedback?(huseby)
Comment 2•9 years ago
|
||
So this feature is a privacy enhancement to prevent CSS named color fingerprinting. This patch came from the Tor Project and it should be disabled by default. When using stand-in colors is enabled, we're telling Firefox to use the Windows colors instead of the native colors for the system. Maybe your assertion is wrong?
Updated•9 years ago
|
Attachment #8773137 -
Flags: feedback?(huseby) → feedback-
Comment 3•9 years ago
|
||
(In reply to Dave Huseby [:huseby] from comment #2)
> So this feature is a privacy enhancement to prevent CSS named color
> fingerprinting. This patch came from the Tor Project and it should be
> disabled by default. When using stand-in colors is enabled, we're telling
> Firefox to use the Windows colors instead of the native colors for the
> system. Maybe your assertion is wrong?
Hi Dave,
The attached log file is the issue I saw. I'd see this issue on MAC OS. Could you please comment for me if I miss something? Thanks
Flags: needinfo?(huseby)
Comment 4•9 years ago
|
||
So the use standins for native colors boolean is only enabled when the user manually sets the pref to hide the native colors of the operating system from JS scripts using named CSS colors to figure out which OS the user is using. It is an active fingerprinting vector. Enabling it by default is not the correct solution. The assertion is being caused by incorrect *default behavior* code. I think you've looped me in because it looks like my standins patch caused this. I don't think that is the case. I would investigate why the assertion is failing. I'd step through the code and see what's going on.
Flags: needinfo?(huseby)
Comment 5•9 years ago
|
||
(In reply to Dave Huseby [:huseby] from comment #4)
> So the use standins for native colors boolean is only enabled when the user
> manually sets the pref to hide the native colors of the operating system
> from JS scripts using named CSS colors to figure out which OS the user is
> using. It is an active fingerprinting vector. Enabling it by default is
> not the correct solution. The assertion is being caused by incorrect
> *default behavior* code. I think you've looped me in because it looks like
> my standins patch caused this. I don't think that is the case. I would
> investigate why the assertion is failing. I'd step through the code and see
> what's going on.
Really thanks for the great help to look into and welcome to take this bug if you want.
Comment 6•9 years ago
|
||
It seems to me this assertion is bogus and should be removed.
SetColor is expected to fail (return false) for the *-win-* and *-mac-* colors on Linux.
Reporter | ||
Comment 7•8 years ago
|
||
Any update here? This issue is still getting hit very frequently by our fuzzer.
Whiteboard: [fuzzblocker]
Comment 8•8 years ago
|
||
(In reply to Dave Huseby [:huseby] from comment #4)
> So the use standins for native colors boolean is only enabled when the user
> manually sets the pref to hide the native colors of the operating system
> from JS scripts using named CSS colors to figure out which OS the user is
> using. It is an active fingerprinting vector. Enabling it by default is
> not the correct solution. The assertion is being caused by incorrect
> *default behavior* code. I think you've looped me in because it looks like
> my standins patch caused this. I don't think that is the case. I would
> investigate why the assertion is failing. I'd step through the code and see
> what's going on.
I would like to untake this bug according to Comment 5.
Assignee: vliu → nobody
Updated•8 years ago
|
Priority: -- → P3
Comment 9•7 years ago
|
||
nsRuleNode is gone now.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•