{"id":"RUSTSEC-2026-0129","aliases":[],"status":"published","title":"Buffer overflow in `Clusterings::from_i32_column_major_order()`","description":"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(\u0026[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.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-05-02T12:00:00Z","modified":"2026-05-13T12:45:06Z","fixes":[{"ecosystem":"crates.io","package":"dahl-salso","fixed_in":["0.6.8"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"crates.io","package":"dahl-salso","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.6.8"}]}]}],"references":[{"url":"https://crates.io/crates/dahl-salso","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0129.html","tags":["advisory"]},{"url":"https://github.com/dbdahl/rust-dahl-salso/issues/1","tags":["report"]}],"sources":{"osv":[{"id":"RUSTSEC-2026-0129","title":"Buffer overflow in `Clusterings::from_i32_column_major_order()`","description":"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(\u0026[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.","status":"published","published":"2026-05-02T12:00:00Z","modified":"2026-05-13T12:45:06.234098Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
