6.5

CVE-2024-43806: bytecodealliance rustix Uncontrolled Resource Consumption

CVSS: 6.5v3.1MediumDeferred
AliasesSUSE-SU-2024:3404-1UBUNTU-CVE-2024-43806DEBIAN-CVE-2024-43806
Published 26-08-2024Last modified 26-08-2024

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.

Overall risk
26/100
0100
Medium · default modelHow is this calculated?
CVSS score
6.5/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.48%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 11 · Related 13

Timeline

  1. 26-08-2024
    PublishedVulnerability first disclosed.
  2. 26-08-2024
    Last 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

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

19-09-202619-10-2026
EPSS score
0.48%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected 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
Show all 18 references