CVE-2025-38580
published high CVSS 3.1 · 7.8ext4: fix inode use after free in ext4_end_io_rsv_work()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < ac999862b98a0f49e858e509f776be51406f1e77 · ce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < 469c44e66e2110054949609dde095788320139d0 · ce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < c678bdc998754589cea2e6afab9401d7d8312ac4 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.15 (affected) · 0 to < 6.15 (unaffected · semver) · 6.15.10 through 6.15.* (unaffected · semver) · 6.16.1 through 6.16.* (unaffected · semver) · 6.17 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: ext4: fix inode use after free in ext4_end_io_rsv_work() In ext4_io_end_defer_completion(), check if io_end->list_vec is empty to avoid adding an io_end that requires no conversion to the i_rsv_conversion_list, which in turn prevents starting an unnecessary worker. An ext4_emergency_state() check is also added to avoid attempting to abort the journal in an emergency state. Additionally, ext4_put_io_end_defer() is refactored to call ext4_io_end_defer_completion() directly instead of being open-coded. This also prevents starting an unnecessary worker when EXT4_IO_END_FAILED is set but data_err=abort is not enabled. This ensures that the check in ext4_put_io_end_defer() is consistent with the check in ext4_end_bio(). Otherwise, we might add an io_end to the i_rsv_conversion_list and then call ext4_finish_bio(), after which the inode could be freed before ext4_end_io_rsv_work() is called, triggering a use-after-free issue.
Related advisories
Vendor advisories explicitly linked to this CVE.
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 path is entered by ordinary buffered writes to a file on a locally mounted ext4 filesystem, reached through the write()/writeback path with no network protocol involved. Filesystem writeback bugs of this class are local-access only. AC:L - The vulnerable predicate mismatch is hit under the default data_err=ignore mount option with no rare config required, and the attacker controls the decisive side of the race — after ext4_finish_bio() clears writeback, they force inode eviction via unlink+close while stalling the rsv_conversion workqueue. Writeback bio failures are themselves inducible locally (dm-thin/thin-pool ENOSPC by writing data, network block devices, removable media, worn eMMC on embedded/automotive). PR:L - Any unprivileged local user with write access to any ext4 filesystem (home directory, /tmp, a container overlay upper dir) can drive buffered writeback into ext4_end_bio(). No capability, ioctl, mount privilege, or user-namespace trick is needed. UI:N - The attacker writes and unlinks their own files and triggers eviction themselves; no victim action, no mounting of a crafted image, and no cooperation from another user is required. S:U - The freed ext4_inode_info and the dangling io_end->inode dereference are both kernel objects in the same security authority as the attacking process, with no VM, IOMMU, or sandbox boundary crossed. This is standard local kernel memory corruption. C:H - ext4_end_io_end() reads the freed inode's i_sb and dereferences EXT4_SB(sb)->s_journal, so grooming the reclaimed ext4_inode_cachep slot turns the stale pointer into an attacker-directed kernel read that can be used for disclosure. Per kernel scoring guidance a use-after-free giving control over freed object contents is High. I:H - The worker performs writes into freed memory — process_one_work() updates work->data, and ext4_do_flush_completed_IO() takes i_completed_io_lock and does list_replace_init() on the freed list head — so a reallocated live inode has its i_rsv_conversion_list hijacked, yielding list corruption and io_end double-free primitives suitable for control-flow hijacking. A:H - Even unexploited, the use-after-free reliably produces a KASAN splat, oops, or panic in ext4_end_io_rsv_work(), and taking a spinlock inside freed/reused memory can hang the rsv_conversion workqueue. Any kernel crash is scored High.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | ce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < ac999862b98a0f49e858e509f776be51406f1e77 (affected · git)ce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < 469c44e66e2110054949609dde095788320139d0 (affected · git)ce51afb8cc5e1867ea0dfdf5e92ddbe31a1fad5d to < c678bdc998754589cea2e6afab9401d7d8312ac4 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.15 (affected)0 to < 6.15 (unaffected · semver)6.15.10 through 6.15.* (unaffected · semver)6.16.1 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
ext4: fix inode use after free in ext4_end_io_rsv_work()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ae8c6e43a8d58149d90707e8b795632b49a82ab652dc6efea6e57854c8974dd1
- Ingested
- 23 Sep 2026, 08:46:47 UTC
- Source record
- Official CVE record