Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-42300

published high CVSS 3.1 · 7.8

erofs: fix race in z_erofs_get_gbuf()

Published
17 Aug 2024, 09:09:07 UTC
Updated
05 Aug 2026, 11:36:29 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxf36f3010f67611a45d66e773bc91e4c66a9abab5 to < 49b22e06a947727a6d1c802d2d9ad92420b90fc5 · f36f3010f67611a45d66e773bc91e4c66a9abab5 to < 7dc5537c3f8be87e005f0844a7626c987914f8fd · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.10 (affected) · 0 to < 6.10 (unaffected · semver) · 6.10.3 through 6.10.* (unaffected · semver) · 6.11 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

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] ..

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerable code is reached through ordinary file reads/readahead on a mounted erofs filesystem (read(), mmap, page-fault paths), which requires local access to the system. There is no network-facing consumer of z_erofs_get_gbuf(). AC:L - The attacker controls both sides of the race: it drives the decompression load (repeated reads plus cache eviction on compressed erofs files) and simultaneously forces the migration via sched_setaffinity() on its own reader threads or CPU oversubscription, and the bug was already shown to reproduce under a plain stress test. PR:L - Any unprivileged local user or sandboxed app that can read a file on an already-mounted erofs image reaches z_erofs_readahead → z_erofs_get_gbuf with no capability, LSM, or ownership check on the path; on Android every app reads compressed erofs system partitions by default. UI:N - The attacker triggers the decompression path entirely with its own reads on an already-mounted filesystem; no victim action such as mounting an image or opening a file is required. S:U - The corrupted spinlock state, the shared global buffer, and the resulting hang all reside within the kernel's own security authority, with no crossing into a hypervisor, IOMMU, or other security scope. C:H - The unbalanced spin_unlock() destroys mutual exclusion on the shared global decompression buffer, so one task's LZ4 decompression reads compressed bytes belonging to another task's file, placing content derived from files the attacker cannot otherwise read into its own page-cache pages; the same window also lets gbuf_growsize() vunmap a buffer still in use. I:H - Concurrent use of the same gbuf lets attacker-supplied compressed input be decompressed into the page cache pages of an unrelated inode, corrupting file data that other — including privileged — processes mmap and execute, and the vunmap-under-use window gives a write to freed/unmapped vmalloc memory. A:H - On CONFIG_EROFS_FS_DEBUG kernels this immediately panics at the DBG_BUGON in z_erofs_put_gbuf(); on production kernels the abandoned gbuf lock is never released, so every subsequent decompression mapping to it spins forever with preemption disabled, producing a hard lockup/RCU stall that requires a reboot.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux f36f3010f67611a45d66e773bc91e4c66a9abab5 to < 49b22e06a947727a6d1c802d2d9ad92420b90fc5 (affected · git)f36f3010f67611a45d66e773bc91e4c66a9abab5 to < 7dc5537c3f8be87e005f0844a7626c987914f8fd (affected · git)Default: unaffected Linux · cna
Linux Linux 6.10 (affected)0 to < 6.10 (unaffected · semver)6.10.3 through 6.10.* (unaffected · semver)6.11 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

2

Linux · cna

erofs: fix race in z_erofs_get_gbuf()

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
be2c6d825e4a2080609106c274ddcc39a0f6e3fee0e0b9483f1e62162aaa22ba
Ingested
23 Sep 2026, 08:26:31 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected