rustix's rustix::fs::Dir iterator with the linux_raw backend can cause memory explosion
CVE-2024-43806GHSA-c827-hfw6-qwvm
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (rustix 0.38.19, 0.37.25, 0.36.16, 0.35.15), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
crates.io rustix
- Affected
- >= 0.35.11, < 0.35.15>= 0.36.0, < 0.36.16>= 0.37.0, < 0.37.25>= 0.38.0, < 0.38.19
- Fixed in
- 0.35.15, 0.36.16, 0.37.25, 0.38.19
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-c827-hfw6-qwvm lists affected ranges: crates.io rustix >=0.35.11 =0.36.0 =0.37.0 =0.38.0 <0.38.19
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 6.5 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2024-43806: 0.48% estimated exploitation activity in the next 30 days; percentile 41.48 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary When using rustix::fs::Dir using the linuxraw backend, it's possible for the iterator to "get stuck" when an IO error is encountered. Combined with a memory over-allocation issue in rustix::fs::Dir::readmore, this can cause quick and unbounded memory explosion (gigabytes in a few seconds if used on a hot path) and eventually lead to an OOM crash of the application. Details Discovery The symptoms were initially discovered in https://github.com/imsnif/bandwhich/issues/284. That post has lots of details of our investigation. See this post and the Discord thread for details. Diagnosis This issue is caused by the combination of two independent bugs: 1. Stuck iterator - The rustix::fs::Dir iterator can fail to halt after encountering an IO error, causing the caller to be stuck in an infinite loop. 2. Memory over-allocation - Dir::readmore incorrectly grows the read buffer unconditionally each time it is called, regardless of necessity. Since <Dir as Iterator::next calls Dir::read,…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-c827-hfw6-qwvm
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2024-43806 Advisory: rustix's `rustix::fs::Dir` iterator with the `linux_raw` backend can cause memory explosion IDs: CVE-2024-43806, GHSA-c827-hfw6-qwvm Record: https://patchnext.com/advisories/cve-2024-43806 (revision 1, source checked 26 Oct 2026, 15:38 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 6.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: rustix 0.38.19, 0.37.25, 0.36.16, 0.35.15. A vendor fix does not mean a deployment is fixed. ## Affected components - crates.io rustix: affected >= 0.35.11, < 0.35.15; >= 0.36.0, < 0.36.16; >= 0.37.0, < 0.37.25; >= 0.38.0, < 0.38.19; fixed in 0.35.15, 0.36.16, 0.37.25, 0.38.19 ## Suggested inspection (read-only) - crates.io rustix: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on rustix. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-c827-hfw6-qwvm (GitHub-reviewed advisory GHSA-c827-hfw6-qwvm lists affected ranges: crates.io rustix >=0.35.11 =0.36.0 =0.37.0 =0.38.0 <0.38.19) Commands are suggestions: review each one before running it.
Loading voting…