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
Validate untrusted footer metadata on open instead of panicking (#8867)
Closes: #8819
A fuzzed Vortex file whose footer segment map declared a segment past
the end of the file panicked while slicing the backing buffer during
open, instead of returning an error. This fixes that plus a few nearby
unchecked-slice / unchecked-shift panics in the same file-open and
array-decode paths:
- Footer parsing validates every segment's `offset + length` against the
file size (the #8819 root cause).
- `populate_initial_segments` bounds-checks the initial-read slice range
before slicing.
- `SerializedArray::from_flatbuffer_and_segment` uses checked offset
arithmetic and bounds-checks a buffer against its segment before
slicing.
- Alignment exponents from footer segment specs, postscript segments,
and array buffer descriptors go through a fallible
`Alignment::try_from_exponent` instead of `from_exponent`, which panics
on a too-large shift.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
0 commit comments