Skip to content
Heist/ feed
UnratedFix available

`SinglyLinkedList::remove` dereferences a null link

Type: advisorySource: OSV1 source record

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`, and safe code can construct the empty list. The 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.

Announced Source revision 1
Original source ↗

RUSTSEC-2026-0309

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:RUSTSEC-2026-0309

bun_collections

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
0.2.1

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0.0.0-0"
          },
          {
            "fixed": "0.2.1"
          }
        ]
      }
    ],
    "package": {
      "name": "bun_collections",
      "purl": "pkg:cargo/bun_collections",
      "ecosystem": "crates.io"
    },
    "database_specific": {
      "cvss": null,
      "source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0309.json",
      "categories": [
        "memory-corruption"
      ],
      "informational": "unsound"
    },
    "ecosystem_specific": {
      "affects": {
        "os": [],
        "arch": [],
        "functions": [
          "bun_collections::pool::SinglyLinkedList::remove"
        ]
      },
      "affected_functions": null
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#17551 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement