Closed Bug 2053289 Opened 4 months ago Closed 4 months ago

stack-overflow [@ <cssparser::parser::Parser>::next_including_whitespace]

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1973126
Tracking Status
firefox154 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: crash)

Crash Data

Found with m-c 20260619-64a89bfa4912 (--enable-address-sanitizer)

This was found by visiting a live website with an ASan build.

STR:

  • Launch browser and visit site

This issue was triggered by visiting https://sandboxvr.de/support/wie-kann-ich-zahlen/.

==1919121==ERROR: AddressSanitizer: stack-overflow on address 0x7bffd337aff8 (pc 0x5555556ba701 bp 0x7bffd337b850 sp 0x7bffd337b000 T6)
    #0 0x5555556ba701 in __asan_region_is_poisoned _asan_rtl_:0
    #1 0x5555556b57df in __asan_memcpy _asan_rtl_:3
    #2 0x7bffe9d4f53b in <cssparser::parser::Delimiters>::from_byte /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:364:9
    #3 0x7bffe9d4f53b in <cssparser::parser::Parser>::next_including_whitespace_and_comments /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:653:38
    #4 0x7bffe9d59efa in <cssparser::parser::Parser>::next_including_whitespace /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:630:24
    #5 0x7bffecd4457b in selectors::parser::parse_qualified_name::<style::selector_parser::SelectorParser, style::gecko::selector_parser::SelectorImpl> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:3026:17
    #6 0x7bffecd37207 in selectors::parser::parse_type_selector::<style::selector_parser::SelectorParser, style::gecko::selector_parser::SelectorImpl, selectors::builder::SelectorBuilder<style::gecko::selector_parser::SelectorImpl>> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:2905:11
    #7 0x7bffecd37207 in selectors::parser::parse_compound_selector::<style::selector_parser::SelectorParser, style::gecko::selector_parser::SelectorImpl> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:3312:8
    #8 0x7bffecd37207 in selectors::parser::parse_selector::<style::selector_parser::SelectorParser, style::gecko::selector_parser::SelectorImpl> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:2829:21
    #9 0x7bffecd34a16 in <selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse_with_state::<style::selector_parser::SelectorParser>::{closure#0} /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:585:36
    #10 0x7bffecd34a16 in <cssparser::parser::Parser>::parse_entirely::<<selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse_with_state<style::selector_parser::SelectorParser>::{closure#0}, selectors::parser::Selector<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:699:22
    #11 0x7bffecd34a16 in cssparser::parser::parse_until_before::<<selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse_with_state<style::selector_parser::SelectorParser>::{closure#0}, selectors::parser::Selector<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:1069:35
    #12 0x7bffecd34a16 in <cssparser::parser::Parser>::parse_until_before::<<selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse_with_state<style::selector_parser::SelectorParser>::{closure#0}, selectors::parser::Selector<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:807:9
    #13 0x7bffecd34a16 in <selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse_with_state::<style::selector_parser::SelectorParser> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:583:34
    #14 0x7bffecdaee11 in <selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>>::parse::<style::selector_parser::SelectorParser> /builds/worker/checkouts/gecko/servo/components/selectors/parser.rs:525:9
    #15 0x7bffecdaee11 in <style::stylesheets::rule_parser::NestedRuleParser as cssparser::rules_and_declarations::QualifiedRuleParser>::parse_prelude /builds/worker/checkouts/gecko/servo/components/style/stylesheets/rule_parser.rs:1051:9
    #16 0x7bffecdaee11 in cssparser::rules_and_declarations::parse_qualified_rule::<style::stylesheets::rule_parser::NestedRuleParser, style_traits::StyleParseErrorKind>::{closure#1} /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/rules_and_declarations.rs:533:61
    #17 0x7bffecdaee11 in <cssparser::parser::Parser>::parse_entirely::<cssparser::rules_and_declarations::parse_qualified_rule<style::stylesheets::rule_parser::NestedRuleParser, style_traits::StyleParseErrorKind>::{closure#1}, selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:699:22
    #18 0x7bffecdaee11 in cssparser::parser::parse_until_before::<cssparser::rules_and_declarations::parse_qualified_rule<style::stylesheets::rule_parser::NestedRuleParser, style_traits::StyleParseErrorKind>::{closure#1}, selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:1069:35
    #19 0x7bffecdaee11 in <cssparser::parser::Parser>::parse_until_before::<cssparser::rules_and_declarations::parse_qualified_rule<style::stylesheets::rule_parser::NestedRuleParser, style_traits::StyleParseErrorKind>::{closure#1}, selectors::parser::SelectorList<style::gecko::selector_parser::SelectorImpl>, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/parser.rs:807:9
    #20 0x7bffecdaee11 in cssparser::rules_and_declarations::parse_qualified_rule::<style::stylesheets::rule_parser::NestedRuleParser, style_traits::StyleParseErrorKind> /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/rules_and_declarations.rs:533:15
    #21 0x7bffecda045c in <cssparser::rules_and_declarations::RuleBodyParser<style::stylesheets::rule_parser::NestedRuleParser, (), style_traits::StyleParseErrorKind> as core::iter::traits::iterator::Iterator>::next /builds/worker/checkouts/gecko/third_party/rust/cssparser/src/rules_and_declarations.rs:307:25
    ...
Crash Signature: [@ stackoverflow | cssparser::parser::Parser::skip_whitespace ] → [@ stackoverflow | cssparser::parser::Parser::skip_whitespace ] [@ stackoverflow | cssparser::parser::Parser::next ]

Another site that triggers this same crash: https://btrendy.dk/

Looking at URLs in crash reports for this signature in our crash data, I saw the testcase for bug 2019071 in the list - there's a reduced testcase there. Looks like that was duped to bug 1973126.

I guess we can resolve this in the same way, but for tracking/deduplication purposes it's probably useful to have a bug open with the various crash signatures associated, so that crash-stats will suggest that bug as a known match. So maybe best not to dupe this (and/or maybe worth un-duping bug 2019071 and using it as the catch-all for the crash signatures?)

Depends on: css-nesting-limit
See Also: → 2019071
No longer blocks: 2046083

(In reply to Daniel Holbert [:dholbert] from comment #2)

it's probably useful to have a bug open with the various crash signatures associated, so that crash-stats will suggest that bug as a known match. So maybe best not to dupe this (and/or maybe worth un-duping bug 2019071 and using it as the catch-all for the crash signatures?)

Oh, I guess bug 1973126 has accumulated some crash signatures (I thought it didn't have any listed at first, for some reason), so maybe it's fine to just dupe there after all and let the crash signatures live there.

Status: NEW → RESOLVED
Closed: 4 months ago
No longer depends on: css-nesting-limit
Duplicate of bug: css-nesting-limit
Resolution: --- → DUPLICATE
See Also: 2019071 →
You need to log in before you can comment on or make changes to this bug.