You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
32-bit targets: arithmetic on file-derived lengths can wrap past a bounds check (wasm32, found by #835) #836
#835 found a parser panic that only a 32-bit target can reach. A UTF-16 string field's end was 4 + char_count.saturating_mul(2). On wasm32 usize is 32 bits, so a corrupt char_count saturates to usize::MAX, the addition wraps to 3 in a release build, the bounds check passes and &slice[4..3] panics. In the browser viewer that aborts the whole export.
Native builds cannot reach it, because a u32 length times 2 fits a 64-bit usize. So no CI job, fuzz target or corpus run sees this class: every one of them runs on 64-bit. Any sum or product of file-derived lengths in usize that a 64-bit build cannot overflow can still wrap on wasm32, the target the viewer ships on, and on any other 32-bit build.
What was checked so far: the other saturating_mul calls in src/ are clamped (compression.rs, by .min() straight after) or compared with a cap (partition_pipe_axes.rs), so they cannot wrap into a bounds check.
What would close this: run the integration tests, and replay the fuzz regressions, on a 32-bit target with overflow checks on, so a wrap panics instead of passing a check. For example, a CI job on i686-unknown-linux-gnu with -C overflow-checks=on under --profile ci. Then fix each site it reports with checked arithmetic, as #835 does.
Activity
DrunkOnJava commentedon Oct 20, 2026
Shipped in v0.6.1: both wraps the i686 job found (#839), on crates.io and PyPI. The browser viewer, built from
main, has had them since #839 merged.chore(release): main takes v0.6.1: its version, its changelog section…
docs: the contribution map drops #836, which #839 closed
docs: the docs name v0.6.1 as the latest release, each channel checked (
ci: run the real-file, CLI, contract and hardening checks on i686 wit…