Repository navigation
Description
The Fuzz workflow had not fuzzed since about 8 November (it was installing stable Rust, fixed in #1950). Its first working run, by hand on that branch for 60 s a target, found failing inputs for two targets: https://github.com/opengeos/RustGIS/actions/runs/43475952194. Seven targets passed.
sheets: two .xls files get past check_compound and panic inside calamine 0.38
Both inputs are compound files (D0 CF 11 E0). Natively sheets::guarded catches the panic and the file is refused as damaged, so the desktop app, CLI and Python are unaffected. In the browser a panic can't be caught, so opening either file takes the web app down. Reproduced on main (916d24d) by calling sheets::sheet_names, sheets::columns and sheets::read on each file:
crash-8c2559b5…(1541 bytes):calamine-0.38.0/src/cfb.rs:320:41: slice index starts at 1536 but ends at 1029, reached fromcfb.rs:130(Cfb::new). calamine's sector reader returns&self.data[start..len]for a sector cut short by the end of the file, and here the sector starts past the end of what was read.crash-8d88cae6…(1953 bytes):calamine-0.38.0/src/utils.rs:29:5: assertion left == right failedinto_u32(s.len() % 4 == 0), reached fromcfb.rs:159. A sector cut short to a length that isn't a multiple of four is read as a table of 32-bit words.
Both come from a sector that the end of the file cuts short, which check_compound in crates/data/src/sheets.rs doesn't refuse for these tables. The fix belongs there (the reader's own check, as #1495 did), with each input generated in a regression test.
crash-8c2559b546b96deb3aae2be7758f8576d38a7149 (base64)
0M8R4KGxGuEAAAAAAAAAAAAAAAG3AAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AwAAAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////3/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+////////////////////////////////////////////////////////////////////////////////////////////////////////7P////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+srKysrKysrKysrKysI6ysrKysrKysrKysrKysrKysrKysrKz///////////8BAAAAAAAEAP//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////UgBvAG8AdAAgAEUubgB0AHIAeQAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAEAAAAAAAAAAVwBvAHIAawBiAG8AbwBrAAAAAAAA+f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIwAAAAAAAAAAAAAAAAASAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAEAAAAAAAAAAVwBvAHIAawBiAG8AbwBrAAAAAAAA+f8AAAAAAAAAAAAAAP////9QSwUG/////////////////////7////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8=
crash-8d88cae6f638d1866fa70129697f43a8932773db (base64)
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+v///////////////wAAAAAAAAAAAAAAAAAAAAASAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wr/////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
geotiff: one out-of-memory report, with no input to reproduce it
The saved file is oom-da39a3ee…, zero bytes long (that name is the SHA-1 of nothing). raster::geotiff::read on empty input returns an error at once, so the file isn't the cause: a fuzzing process went over the 2 GB limit and libFuzzer had no input to save for it. Finding the real input needs a local run of the target (cargo +nightly fuzz run -O geotiff -- -rss_limit_mb=2048), or the next nightly run's artifacts. Not reproduced yet.
Activity
github-actions commentedon Nov 14, 2026
The nightly fuzz run on 2aa4b22 also found failing inputs for: geotiff,sheets,sniff. Run: https://github.com/opengeos/RustGIS/actions/runs/43551172146.
choupeanut commentedon Nov 15, 2026
I'll take the two reproducible XLS compound-file crashes in this issue. I checked assignees, comments, cross-references and open PRs and found no existing claim or fix for these cases. I'll validate the FAT/DIFAT sector reads before calamine, generate the truncated-container cases in regression tests, verify all spreadsheet entry points refuse them without reaching a panic, and keep valid XLS input working. No dependency, command-parameter or project-format changes. The unreproduced GeoTIFF OOM and later sniff findings remain outside this PR.
choupeanut commentedon Nov 15, 2026
Implemented the two reproducible XLS crashes in #2148 (ready for review). All three public spreadsheet entry points now reject both original fuzz inputs before calamine, without a panic. Generated regressions cover both sector sizes and FAT/DIFAT/mini FAT partial words; 17 spreadsheet tests, full local CI, test-hygiene, pre-commit and strict wasm checks pass. This deliberately leaves the unreproduced GeoTIFF OOM and later sniff findings open.
github-actions commentedon Nov 16, 2026
The nightly fuzz run on 414dd19 also found failing inputs for: oom-76cff9102705978acbcb14c12a6b32279a0829ba. Run: https://github.com/opengeos/RustGIS/actions/runs/43798105587.
github-actions commentedon Nov 17, 2026
The nightly fuzz run on 55e1ede also found failing inputs for: oom-8a69e45665de2c213ba44608eacc307dfe480e04. Run: https://github.com/opengeos/RustGIS/actions/runs/44009694221.
giswqs commentedon Nov 17, 2026
geotiff OOMs: reproduced, and why
Ran both saved inputs through the ASan fuzz build (
cargo +nightly fuzz run -O geotiff <input> -- -rss_limit_mb=2048) on 55e1ede:oom-8a69e456…(run 44009694221, 390 bytes): doesn't reproduce. It runs in 12 ms and ends incorrupt deflate stream, with 64 MB as the largest allocation. libFuzzer saves whatever input is running when the RSS watchdog fires, so this one was probably just running when the fork child crossed the limit.oom-76cff910…(run 43798105587, 432 bytes): reproduces,out-of-memory (used: 2103Mb; limit: 2048Mb). A normal release build peaks at 1,988 MB RSS and then returnsGeoTIFF: decoder limits exceeded. It doesn't crash, but it commits about 2 GB first.What the file claims: 8 × 4,160,741,449 pixels, uncompressed, one 135-byte strip, and SamplesPerPixel given twice (1, then 8). The full image is too large, so
read_limited_with_nodatacoarsens it to fitmax_samples()anddecimatefills one f32 grid per band with NaN (raster::filled, about 248 MB a band, 8 bands) before reading any strip. Only then does the decoder refuse the strip.So this is a budget mismatch, not a runaway allocation.
max_samples()is a quarter of physical memory (512M samples, 2 GB of f32, on the 16 GB runner), above the harness's 2,048 MB cap. Any tiny header claiming a huge multi-band image will hit it. Options:memory::physical, or the fuzz job under a cgroup memory limit, whichphysical()already honours). Then the reader's budget fits under-rss_limit_mb.1 is a real improvement on its own; 2 stops the nightly job flagging the designed budget. Either needs a maintainer's call on library behaviour, so neither is done yet.
giswqs commentedon Nov 17, 2026
sniff: a damaged FlatGeobuf polygon panics inside
flatbuffersThe one-minute
ci:fuzzrun on #2328 foundcrash-fe3c0525…(3,843 bytes) forsniff: https://github.com/opengeos/RustGIS/actions/runs/44029793100. It isn't caused by #2328. It reproduces on main (eec18bb'srustgis-data) in a plain build through the target's own path (sniff_extension→fgb→read_layers):A MultiPolygon's
ends(ring ends) point past itsxyarray, andread_coordsindexes the coordinates without checking.f.to_wkbatfgb.rs:448(and the otherto_wkbcalls in that file) should check a feature's geometry first: everyendsvalue withinxy.len() / 2, rising, andz/mas long asxywhen present, for each part. A failing geometry becomes a skipped feature, counted as the reader already countsskipped. Natively a caught panic would refuse the file, but in the browser a panic can't be caught, so this file takes the web app down.crash-fe3c0525ebaa9ed8171e5cb6d08a6d047abcf932 (base64)
fix(fuzz): read memory limits at their floors in fuzzing builds (open…
fix(data): refuse a GeoTIFF chunk too large to decode before setting …
github-actions commentedon Nov 18, 2026
The nightly fuzz run on 4e36271 also found failing inputs for: read_layers. Run: https://github.com/opengeos/RustGIS/actions/runs/44229963273.