CVE-2024-43806: bytecodealliance rustix Uncontrolled Resource Consumption
Vulnerability summary
CVE-2024-43806 is a medium (CVSS 6.5) Uncontrolled Resource Consumption vulnerability in bytecodealliance rustix. EPSS estimates a 0.48% chance of exploitation in the next 30 days, higher than 40% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 11 · Related 13Timeline
- 26-08-2024PublishedVulnerability first disclosed.
- 26-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · ChainguardEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · Crates.ioEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- NVDNIST6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.48%
Chance of exploitation in the next 30 days
Percentile
40%
Versus all other CVEs
30-day change
0.00 pp
From 0.48% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Chainguard9 products
- bat< 0.24.0-r2
- bat-doc< 0.24.0-r2
- berg< 0.3.5-r2
- pgcat< 1.2.0-r1
- zed< 0.147.2-r0
Wolfi9 products
- bat< 0.24.0-r2
- bat-doc< 0.24.0-r2
- berg< 0.3.5-r2
- pgcat< 1.2.0-r1
- zed< 0.147.2-r0
Opensuse4 products
- 389-ds&distro=openSUSE Tumbleweed< 3.1.1~git13.a9c7ff9-1.1
- rage-encryption&distro=openSUSE Leap 15.5< 0.10.0+0-150500.3.6.1
- rage-encryption&distro=openSUSE Leap 15.6< 0.10.0+0-150500.3.6.1
- rage-encryption&distro=openSUSE Tumbleweed< 0.10.0+0-3.1
Suse2 products
- rage-encryption&distro=SUSE Linux Enterprise Module for Basesystem 15 SP5< 0.10.0+0-150500.3.6.1
- rage-encryption&distro=SUSE Linux Enterprise Module for Basesystem 15 SP6< 0.10.0+0-150500.3.6.1
Bytecodealliance1 product
- 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
Crates.Io1 product
- 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
Debian1 product
- rust-rustixAll versions (No fix recorded) | < 0.38.21-1
Ubuntu1 product
- rust-rustixAll versions (No fix recorded)
8 vendors · 28 products
References
18 links- github.com/bytecodealliance/rustix/security/advisories/GHSA-c827-hfw6-qwvmX Refsource CONFIRMREPORTAdvisoryWEB
Show all 18 references
- lists.opensuse.org/archives/…Advisory