| Summary: | null ptr deref with ::highlight {background: red} | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
| Component: | CSS | Assignee: | Rob Buis <rbuis> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, cgarcia, ews-feeder, gpoo, koivisto, megan_gardner, product-security, rbuis, svillar, webkit-bug-importer, wenson_hsieh, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryosuke Niwa
2021-01-06 17:16:31 PST
This should be simple to fix:
--- a/Source/WebCore/css/SelectorChecker.cpp
+++ b/Source/WebCore/css/SelectorChecker.cpp
@@ -1143,7 +1143,7 @@ bool SelectorChecker::checkOne(CheckingContext& checkingContext, const LocalCont
// Always matches when not specifically requested so it gets added to the pseudoIdSet.
if (checkingContext.pseudoId == PseudoId::None)
return true;
- if (checkingContext.pseudoId != PseudoId::Highlight)
+ if (checkingContext.pseudoId != PseudoId::Highlight || !selector.argumentList())
return false;
return selector.argumentList()->first() == checkingContext.nameForHightlightPseudoElement;
I'll make a patch tomorrow. It does not look like a security bug to me.
Created attachment 417440 [details]
Patch
Looks like this is not a security issue? (In reply to Ryosuke Niwa from comment #3) > Looks like this is not a security issue? Indeed, AFAICS this is not a security issue. Committed r271451: <https://trac.webkit.org/changeset/271451> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417440 [details]. |