Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-43806

MEDIUM 6.5EPSS 55%

`rustix::fs::Dir` iterator with the `linux_raw` backend can cause memory explosion

Also known as GHSA-c827-hfw6-qwvm

Mitigation

  • Upgrade rustix to one of 0.35.15, 0.36.16, 0.37.25, 0.38.19 (or later in the same release line).

Who should check

  • Projects that depend on crates.io package rustix (>= 0.35.11, < 0.35.15)
  • Anyone running bytecodealliance rustix >= 0.35.11, < 0.35.15; >= 0.36.0, < 0.36.16; >= 0.37.0, < 0.37.25; >= 0.38.0, < 0.38.19

Vulnerability facts

Affected
rustix >= 0.35.11, < 0.35.15
Fixed in
0.35.15, 0.36.16, 0.37.25, 0.38.19
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, login needed
CVSS
6.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
0.84% chance of exploitation in 30 days (percentile 55, 2026-11-26)
CWE
CWE-400
Published
Modified

Description

Rustix is a set of safe Rust bindings to POSIX-ish APIs. When using `rustix::fs::Dir` using the `linux_raw` 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::read_more`, 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. The symptoms were initially discovered in https://github.com/imsnif/bandwhich/issues/284. That post has lots of details of our investigation. Full details can be read on the GHSA-c827-hfw6-qwvm repo advisory. If a program tries to access a directory with its file descriptor after the file has been unlinked (or any other action that leaves the `Dir` iterator in the stuck state), and the implementation does not break after seeing an error, it can cause a memory explosion. As an example, Linux's various virtual file systems (e.g. `/proc`, `/sys`) can contain directories that spontaneously pop in and out of existence. Attempting to iterate over them using `rustix::fs::Dir` directly or indirectly (e.g. with the `procfs` crate) can trigger this fault condition if the implementation decides to continue on errors. An attacker knowledgeable about the implementation details of a vulnerable target can therefore try to trigger this fault condition via any one or a combination of several available APIs. If successful, the application host will quickly run out of memory, after which the application will likely be terminated by an OOM killer, leading to denial of service. This issue has been addressed in release versions 0.35.15, 0.36.16, 0.37.25, and 0.38.19. Users are advised to upgrade. There are no known workarounds for this issue.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io rustix>= 0.35.11, < 0.35.150.35.15, 0.36.16, 0.37.25, 0.38.19osv
bytecodealliance rustix>= 0.35.11, < 0.35.15; >= 0.36.0, < 0.36.16; >= 0.37.0, < 0.37.25; >= 0.38.0, < 0.38.19—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-43806. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-43806.md
Affected: rustix >= 0.35.11, < 0.35.15
Fixed in: 0.35.15, 0.36.16, 0.37.25, 0.38.19

Steps:
1. Search this machine and project for rustix (crates.io), bytecodealliance rustix: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-43806 being exploited?

There is no confirmed exploitation: CVE-2024-43806 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.84% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-43806?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, login needed.

Which versions are affected by CVE-2024-43806?

rustix >= 0.35.11, < 0.35.15.

Is there a fix for CVE-2024-43806?

Yes. Fixed in 0.35.15, 0.36.16, 0.37.25, 0.38.19. Upgrade rustix to one of 0.35.15, 0.36.16, 0.37.25, 0.38.19 (or later in the same release line).

How do I check if I'm affected by CVE-2024-43806?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors