rustsec-2026-0198
Vulnerability from osv_rustsec
Published
2026-07-03 12:00
Modified
2026-07-03 14:33
Summary
`Report::frames_mut` allows aliased mutable references
Details

Affected versions of this crate return an iterator from Report::frames_mut whose &mut Frame items have lifetimes independent of the iterator, so all yielded references can be held at the same time. A yielded frame's sources are also yielded by the iterator and reachable through the parent frame via Frame::sources_mut, allowing safe code to obtain two live mutable references to the same frame. This is undefined behavior and can be used to cause a segmentation fault (see reproducer in the linked issue). Versions 0.1.0 and 0.1.1 are affected through Frame::source_mut instead of Frame::sources_mut.

The flaw is fixed in 0.8.0 by replacing the iterator with internal iteration: Report::frames_mut now takes a visitor closure, so mutable access to a frame is scoped and cannot overlap with access to its sources.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "memory-corruption"
        ],
        "cvss": null,
        "informational": "unsound"
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "error_stack::Report::frames_mut"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "error-stack",
        "purl": "pkg:cargo/error-stack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.8.0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "Affected versions of this crate return an iterator from\n`Report::frames_mut` whose `\u0026mut Frame` items have lifetimes independent\nof the iterator, so all yielded references can be held at the same time.\nA yielded frame\u0027s sources are also yielded by the iterator and reachable\nthrough the parent frame via `Frame::sources_mut`, allowing safe code to\nobtain two live mutable references to the same frame. This is undefined\nbehavior and can be used to cause a segmentation fault (see reproducer in\nthe linked issue). Versions 0.1.0 and 0.1.1 are affected through\n`Frame::source_mut` instead of `Frame::sources_mut`.\n\nThe flaw is fixed in 0.8.0 by replacing the iterator with internal\niteration: `Report::frames_mut` now takes a visitor closure, so mutable\naccess to a frame is scoped and cannot overlap with access to its\nsources.",
  "id": "RUSTSEC-2026-0198",
  "modified": "2026-07-03T14:33:41Z",
  "published": "2026-07-03T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/error-stack"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0198.html"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/hashintel/hash/issues/8945"
    },
    {
      "type": "WEB",
      "url": "https://github.com/hashintel/hash/pull/8946"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "`Report::frames_mut` allows aliased mutable references"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

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…