Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

servo/stylo
main @ 44bdcc6
99
Fixes
0
CVEs
HIGH
Peak severity
84.8%
Coverage
Highlights
Auth Bypass: 34 prior fixes. Scrutinize any change in this area.
script/dom/bindings/codegen/CodegenRust.py: most-fixed (6 issues). Treat as high-risk during review.
65 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Safety: Unrooted or incorrectly managed JS pointers inside WebIDL union/dictionary conversions allow premature garbage collection, leading to use-after-free conditions. Safe pointer-rooting primitives must be systematically generated.
Auth Bypass: CSS sanitization logic historically validated only top-level rules, allowing malicious styles to bypass filters inside nested rules. Recursion checks are necessary to close this escape hatch.
Memory Corruption: Uninitialized memory, wrong vector resizing mechanisms, and integer overflow vulnerabilities inside the Gecko binding generation scripts can trigger out-of-bounds operations and memory unsafety during CSS property parsing.