diff --git a/crates/trk-io/RUSTSEC-0000-0000.md b/crates/trk-io/RUSTSEC-0000-0000.md new file mode 100644 index 0000000000..02dfac2eb2 --- /dev/null +++ b/crates/trk-io/RUSTSEC-0000-0000.md @@ -0,0 +1,23 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "trk-io" +date = "2026-05-02" +url = "https://github.com/imeka/trk-io/issues/24" +informational = "unsound" +categories = ["memory-corruption"] +keywords = ["out-of-bounds"] + +[versions] +patched = [] +``` + +# Out-of-bounds read in `ArraySequence` `Index` implementation + +The `Index` implementation for `ArraySequence` uses `get_unchecked(i)` and +`get_unchecked(i+1)` on `self.offsets` without validating bounds. An empty +`ArraySequence` (offsets = `[0]`, len() = 0) indexed at 0 calls +`get_unchecked(1)` which is out-of-bounds. + +This can be triggered through safe public APIs — `ArraySequence::empty()` +followed by `&seq[0]` — with no `unsafe` required from the caller. \ No newline at end of file