Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a7a139550ae70beba78a6f67510d32d17a93d158
https://github.com/WebKit/WebKit/commit/a7a139550ae70beba78a6f67510d32d17a93d158
Author: Matthieu Dubet <[email protected]>
Date: 2026-02-18 (Wed, 18 Feb 2026)
Changed paths:
A LayoutTests/fast/css/nested-style-depth-crash-expected.txt
A LayoutTests/fast/css/nested-style-depth-crash.html
M Source/WebCore/css/parser/CSSParser.cpp
Log Message:
-----------
[CSS] Apply nesting depth limit to style rules in addition to group rules
https://bugs.webkit.org/show_bug.cgi?id=308005
rdar://164580735
Reviewed by Brent Fulgham.
The maximumRuleListNestingLevel check was only applied in
consumeNestedGroupRules, but deeply nested style rules (via CSS nesting)
could still cause a stack overflow. Move the constant to file scope and
add the same depth check in consumeStyleRule.
Test: fast/css/nested-style-depth-crash.html
* LayoutTests/fast/css/nested-style-depth-crash-expected.txt: Added.
* LayoutTests/fast/css/nested-style-depth-crash.html: Added.
* Source/WebCore/css/parser/CSSParser.cpp:
(WebCore::CSSParser::consumeNestedGroupRules):
(WebCore::CSSParser::consumeStyleRule):
Canonical link: https://commits.webkit.org/307784@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications