{"id":"RUSTSEC-2026-0129","aliases":["RUSTSEC-2026-0129"],"related":[],"kind":"vulnerability","state":"published","title":"Buffer overflow in `Clusterings::from_i32_column_major_order()`","summary":"The `from_i32_column_major_order` method can create inconsistent internal\nstate. When `labels` length and `n_items` mismatch, `n_clusterings` becomes\n`labels.len() / n_items` (truncated), but subsequent calls to `label()` use\nindices that exceed the internal data bounds, causing a buffer overflow.\n\nFor example, `Clusterings::from_i32_column_major_order(&[1,2,3,4,5], 3)`\ncreates clusterings with `n_clusterings = 5/3 = 1`. Then\n`clusterings.label(1, 0)` accesses index `1*3 = 3`, but only 3 elements\nexist (indices 0,1,2), causing out-of-bounds access.\n\nThis can be triggered through safe public APIs —\n`from_i32_column_major_order()` and `label()` — with no `unsafe` required\nfrom the caller.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"The `from_i32_column_major_order` method can create inconsistent internal\nstate. When `labels` length and `n_items` mismatch, `n_clusterings` becomes\n`labels.len() / n_items` (truncated), but subsequent calls to `label()` use\nindices that exceed the internal data bounds, causing a buffer overflow.\n\nFor example, `Clusterings::from_i32_column_major_order(&[1,2,3,4,5], 3)`\ncreates clusterings with `n_clusterings = 5/3 = 1`. Then\n`clusterings.label(1, 0)` accesses index `1*3 = 3`, but only 3 elements\nexist (indices 0,1,2), causing out-of-bounds access.\n\nThis can be triggered through safe public APIs —\n`from_i32_column_major_order()` and `label()` — with no `unsafe` required\nfrom the caller.","format":"markdown","source":"rustsec"}],"published":"2026-05-02T12:00:00.000Z","modified":"2026-05-13T12:45:06.234Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.6.8"}],"ecosystem":"crates.io","package":"dahl-salso","purl":"pkg:cargo/dahl-salso","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/dahl-salso","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0129.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/dbdahl/rust-dahl-salso/issues/1","tags":["report"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0129","url":"https://rustsec.org/advisories/RUSTSEC-2026-0129.html","licence":"CC0-1.0","modified":"2026-05-13T12:45:06.234Z"}],"updatedAt":"2026-11-25T22:56:43.350Z"}