{"id":"RUSTSEC-2026-0309","aliases":["RUSTSEC-2026-0309"],"related":[],"kind":"vulnerability","state":"published","title":"`SinglyLinkedList::remove` dereferences a null link","summary":"In versions before 0.2.1, `SinglyLinkedList::remove` is safe and walks the intrusive list with an unchecked dereference. On an empty list, or when `node` is not in the list, `(*current_elm).next` reads a null pointer. That is undefined behavior. The list head is a raw `*mut Node<T>`, and safe code can construct the empty list.\n\nThe maintainer fixed this in 0.2.1 by rejecting those two cases with an unconditional `assert!` before the pointer is followed, matching the upstream Zig `unwrap` on the same paths. 0.2.0 was yanked. Versions 0.1.0 through 0.1.13 are still published and still contain the unchecked walk.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"In versions before 0.2.1, `SinglyLinkedList::remove` is safe and walks the intrusive list with an unchecked dereference. On an empty list, or when `node` is not in the list, `(*current_elm).next` reads a null pointer. That is undefined behavior. The list head is a raw `*mut Node<T>`, and safe code can construct the empty list.\n\nThe maintainer fixed this in 0.2.1 by rejecting those two cases with an unconditional `assert!` before the pointer is followed, matching the upstream Zig `unwrap` on the same paths. 0.2.0 was yanked. Versions 0.1.0 through 0.1.13 are still published and still contain the unchecked walk.","format":"markdown","source":"rustsec"}],"published":"2026-09-20T12:00:00.000Z","modified":"2026-09-25T18:00:04.471Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.2.1"}],"ecosystem":"crates.io","package":"bun_collections","purl":"pkg:cargo/bun_collections","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/bun_collections","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0309.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/putao520/bao/issues/46","tags":["report"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0309","url":"https://rustsec.org/advisories/RUSTSEC-2026-0309.html","licence":"CC0-1.0","modified":"2026-09-25T18:00:04.471Z"}],"updatedAt":"2026-11-25T22:56:43.415Z"}