Open Bug 2061975 Opened 3 months ago Updated 3 months ago

Crash in [@ zlib_rs::inflate::writer::Writer::copy_match_help]

Categories

(Core :: General, defect)

defect

Tracking

()

Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- fix-optional
firefox153 --- wontfix
firefox154 --- wontfix
firefox155 --- fix-optional

People

(Reporter: calixte, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/5f4931f6-2bc6-4f17-9245-92f4d0260807

MOZ_CRASH Reason:

index out of bounds: the len is 5017 but the index is 5017

Top 10 frames:

0  xul.dll  RustMozCrash(char const*, int, char const*)  mozglue/static/rust/wrappers.cpp:17
1  xul.dll  mozglue_static::panic_hook(std::panic::PanicHookInfo*)  mozglue/static/rust/lib.rs:99
2  xul.dll  core::ops::function::FnOnce::call_once<void (*)(ref$<std::panic::PanicHookInfo>)...
3  xul.dll  std::panicking::panic_with_hook()  library/std/src/panicking.rs:833
4  xul.dll  std::panicking::panic_handler::closure$0()  library/std/src/panicking.rs:698
5  xul.dll  std::sys::backtrace::__rust_end_short_backtrace<std::panicking::panic_handler::c...  library/std/src/sys/backtrace.rs:182
6  xul.dll  std::panicking::panic_handler()  library/std/src/panicking.rs:689
7  xul.dll  core::panicking::panic_fmt()  library/core/src/panicking.rs:80
8  xul.dll  core::panicking::panic_bounds_check()  library/core/src/panicking.rs:271
9  xul.dll  zlib_rs::inflate::inflate_fast_help_avx2(zlib_rs::inflate::State*, unsigned long...  third_party/rust/zlib-rs/src/inflate.rs:1906

There is 1 crash in nightly 155 with buildid 20260806095421.

Clouseau analysis (confidence probable): The crash is a Rust bounds-check panic inside the vendored zlib-rs crate's AVX2 inflate fast path, in Writer::copy_match_help — the exact function named in the signature. The most recent change to this function's buffer-capacity math (len = Ord::min(self.filled + length + N, capacity)) was bug 2023197's 0.6.3 upgrade, which sits directly above older, unmodified direct-index copy code that is what actually panics — a plausible off-by-one interaction, though not none of the given seed candidates touch this area at all.

MOZ_CRASH_REASON: index out of bounds: the len is 5017 but the index is 5017 is the canonical message shape produced by core::panicking::panic_bounds_check for a plain buf[idx] access (as opposed to a range-slice failure), matching the direct-index copy statements at copy_match_help's overlap-copy branch.

Suspected regressor: dfbb73240fbf (gh) (bug 2023197) by Lars Eggert.

Code references:

:leggert, can you have a look please?

Flags: needinfo?(leggert)
Blocks: clouseau, 2023197

:calixte, since this bug is a regression, could you fill (if possible) the regressed_by field?
For more information, please visit BugBot documentation.

Flags: needinfo?(cdenizet)
No longer blocks: 2023197
Flags: needinfo?(cdenizet)
Regressed by: 2023197

Set release status flags based on info from the regressing bug 2023197

Might be worth checking upstream to see if any of their recent point releases already fixed this. Note that bug 2060270 was already filed for updating zlib-rs in case we eventually want/need to set a dependency here.

See Also: → 2061973

Per the discussion on bug 2061973, I don't think this is a regression.

Flags: needinfo?(leggert)
Product: Firefox → Core

The severity field is not set for this bug.
:glob, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(glob)

Assuming this has the same severity as bug 2061973, setting as S3. Feel free to adjust if required.

Severity: -- → S3
Flags: needinfo?(glob)
You need to log in before you can comment on or make changes to this bug.