Repository navigation
v1.2.2: fix integer overflow crash in decode_array/decode_list_utf8_array
Security fix
Found via a real security review, confirmed with a direct exploit:
5 buffer-bounds checks (3 in decode_array, 2 in decode_list_utf8_array)
computed end = start + length from an attacker-controlled BufferDesc
with only a sign check, no upper bound. Mojo's Int silently wraps on
overflow, so a crafted offset/length pair near Int64::MAX bypasses the
end > len(body) check and crashes the process on the resulting
out-of-bounds slice.
Affects every consumer of this package -- decode_arrow_file is a
general-purpose parser for an externally-supplied file format, so a
crafted or corrupted .feather file is a real, standard threat model.
Fix: a new _checked_slice_bounds helper applies the overflow-safe
subtraction pattern (length > body_len - start) already used elsewhere
in this file, now applied consistently at all 5 vulnerable call sites.
Verified: reverted one call site to confirm the new regression tests
crash the whole suite exactly like the real exploit (not just fail an
assertion), proving both the tests and the vulnerability are real.
65/65 tests pass (2 new). No performance change. Purely additive, zero
breaking changes.