CVE-2024-42300: erofs: fix race in z_erofs_get_gbuf()
In the Linux kernel, the following vulnerability has been resolved:
erofs: fix race in z_erofs_get_gbuf()
In z_erofs_get_gbuf(), the current task may be migrated to another
CPU between `z_erofs_gbuf_id()` and `spin_lock(&gbuf->lock)`.
Therefore, z_erofs_put_gbuf() will trigger the following issue
which was found by stress test:
<2>[772156.434168] kernel BUG at fs/erofs/zutil.c:58!
..
<4>[772156.435007]
<4>[772156.439237] CPU: 0 PID: 3078 Comm: stress Kdump: loaded Tainted: G E 6.10.0-rc7+ #2
<4>[772156.439239] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 1.0.0 01/01/2017
<4>[772156.439241] pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
<4>[772156.439243] pc : z_erofs_put_gbuf+0x64/0x70 [erofs]
<4>[772156.439252] lr : z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
..
<6>[772156.445958] stress (3127): drop_caches: 1
<4>[772156.446120] Call trace:
<4>[772156.446121] z_erofs_put_gbuf+0x64/0x70 [erofs]
<4>[772156.446761] z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
<4>[772156.446897] z_erofs_decompress_queue+0x740/0xa10 [erofs]
<4>[772156.447036] z_erofs_runqueue+0x428/0x8c0 [erofs]
<4>[772156.447160] z_erofs_readahead+0x224/0x390 [erofs]
..
Security readout for executives and security teams
Plain-English summary
A timing race in Linux's EROFS compressed-file handling can cause a kernel BUG and system crash during decompression or readahead. The supplied CVSS rating is 7.8, reflecting potentially severe local impact. Organizations using EROFS on affected Linux kernels should prioritize confirmation and remediation, especially where lower-privileged users can access EROFS-backed content.
Executive priority
Treat as a high-priority kernel reliability and security update on systems using EROFS. First identify actual EROFS usage; broad emergency action across systems that do not use it is not supported by the supplied evidence. Escalate internet-facing or multi-user hosts where untrusted local users can reach EROFS-backed content.
Technical view
The executing task can migrate CPUs between selecting a per-CPU EROFS buffer and locking it. The later release operation may then reference inconsistent buffer state, triggering a kernel BUG in z_erofs_put_gbuf(). The supplied trace reaches this condition through LZ4 decompression, the decompression queue, and readahead. Two Linux stable commits are cited as resolutions.
Likely exposure
Exposure requires an affected Linux kernel and use of EROFS compressed-file paths. The supplied record identifies the Linux 6.10-era range, but its version encoding is insufficiently clear for precise distribution-level conclusions. Confirm the running kernel, EROFS availability and usage, compression configuration, and vendor backport status.
Exploitation context
The CVSS vector describes local, low-complexity access requiring low privileges and no user interaction. The bundle reports no CISA KEV listing and provides no evidence of active exploitation or a public exploit. Its demonstrated evidence is a stress-test-triggered kernel BUG; reliable security impact beyond that crash is not established here.
Researcher notes
The core condition is a CPU-migration race between z_erofs_gbuf_id() and acquisition of gbuf->lock, producing inconsistent acquire/release handling. The public description demonstrates a BUG during LZ4 readahead under stress. The supplied CVSS claims confidentiality, integrity, and availability impact, but the bundle does not document an exploitation primitive establishing those outcomes.
Mitigation direction
Apply a vendor-supported kernel update containing the cited EROFS race fix.
Check distribution advisories for backported fixes and exact affected package versions.
Prioritize systems actively mounting or consuming compressed EROFS filesystems.
If updating is delayed, consult vendor guidance for supported exposure-reduction measures.
Validation and detection
Record each system's running kernel build and distribution package revision.
Determine whether EROFS is enabled, loaded, mounted, or used by deployed images.
Compare vendor kernel sources or changelogs with the two cited stable fixes.
After updating, confirm the fixed kernel is running and affected workloads remain stable.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-42300 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.