RUSTSEC-2026-0300 (GHSA-X6J6-3FFP-QRFR)

Vulnerability from osv_rustsec – Published: 2026-09-02 12:00 – Updated: 2026-09-22 07:35 – Source website
VLAI
Summary
Use-after-free in `clear` and `retain` when an element's `Drop` panics
Details

SkipList::clear drops the node chain and only then resets tail and len. The drop runs each element's Drop, and T carries no bounds excluding a panicking one. If it unwinds, tail still points at the freed node while len stays non-zero.

back(), back_mut(), last_key_value() and last() dereference tail through unsafe, so reading the container after the unwind is a use-after-free (CWE-416). Drop for SkipList calls Box::from_raw on self.head, which clear already destroyed, so dropping the container is a double free (CWE-415).

retain, retain_mut and dedup_by reach the same state through Node::filter_rebuild, which frees nodes and runs a user predicate before the caller commits tail and len. There the head links are left partially rewired, so traversal can also reach freed nodes.

Mitigation

Update to 1.1.1.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "memory-corruption"
        ],
        "cvss": null,
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "skiplist::ordered_skip_list::OrderedSkipList::clear",
            "skiplist::ordered_skip_list::OrderedSkipList::dedup_by",
            "skiplist::ordered_skip_list::OrderedSkipList::retain",
            "skiplist::skip_list::SkipList::clear",
            "skiplist::skip_list::SkipList::dedup_by",
            "skiplist::skip_list::SkipList::retain",
            "skiplist::skip_list::SkipList::retain_mut",
            "skiplist::skip_map::SkipMap::clear",
            "skiplist::skip_map::SkipMap::retain"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "skiplist",
        "purl": "pkg:cargo/skiplist"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "1.1.1"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-x6j6-3ffp-qrfr"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "`SkipList::clear` drops the node chain and only then resets `tail` and `len`.\nThe drop runs each element\u0027s `Drop`, and `T` carries no bounds excluding a\npanicking one. If it unwinds, `tail` still points at the freed node while `len`\nstays non-zero.\n\n`back()`, `back_mut()`, `last_key_value()` and `last()` dereference `tail`\nthrough `unsafe`, so reading the container after the unwind is a use-after-free\n(CWE-416). `Drop for SkipList` calls `Box::from_raw` on `self.head`, which\n`clear` already destroyed, so dropping the container is a double free\n(CWE-415).\n\n`retain`, `retain_mut` and `dedup_by` reach the same state through\n`Node::filter_rebuild`, which frees nodes and runs a user predicate before the\ncaller commits `tail` and `len`. There the head links are left partially\nrewired, so traversal can also reach freed nodes.\n\n## Mitigation\n\nUpdate to 1.1.1.",
  "id": "RUSTSEC-2026-0300",
  "modified": "2026-09-22T07:35:37Z",
  "published": "2026-09-02T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/skiplist"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0300.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/JP-Ellis/rust-skiplist/pull/334"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "Use-after-free in `clear` and `retain` when an element\u0027s `Drop` panics"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…