CVE-2025-38220
NoneCVSS
—
EPSS
0.2%
Published
Jul 4, 2025
CISA due date
—
Cloudanix analysis
A flaw in how the Linux kernel handles certain file types on specific storage configurations can make computers crash during routine operations.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Causes a NULL pointer dereference crash in ext4 during orphan inode cleanup when a symlink inode is processed in data journaling mode, because ext4_dirty_journalled_data calls folio_mark_dirty on an inode lacking an a_ops vector.
Why it matters to the business
Produces kernel panics and unplanned system downtime on Linux deployments using ext4 with data journaling, increasing operational risk across widely deployed kernel versions and downstream packages.
How an attack unfolds
An attacker with local access arranges an ext4 filesystem containing orphaned symlinks under data journaling, then triggers mount or orphan cleanup paths; listed threat actors associated with Linux kernel privilege escalation campaigns may chain or trigger similar memory corruption conditions to achieve denial of service.
How to fix it
Apply the upstream fix in commit cf6a4c4ac7b6e3214f25df594c9689a62f1bb456 or upgrade to a kernel containing that change; for s5cmd packages upgrade Chainguard and Wolfi variants to 2.3.0-r4.
How to confirm the fix worked
Confirm the running kernel contains commit cf6a4c4ac7b6e3214f25df594c9689a62f1bb456, then reproduce generic/388-style fstests or mount a crafted image with orphaned symlinks under data journaling and verify absence of the NULL dereference.
Typical attack path
- Gain local access to a system with ext4 data journaling enabled
- Create or manipulate filesystem state to leave symlink inodes on the orphan list
- Initiate mount or operations invoking ext4_orphan_cleanup
- Trigger ext4_truncate and ext4_block_zero_page_range on the symlink
- Cause NULL dereference via missing a_ops in folio_mark_dirty
How to detect it
Inspect kernel logs and dmesg for BUG: kernel NULL pointer dereference traces containing ext4_block_zero_page_range, ext4_truncate, ext4_process_orphan, and ext4_orphan_cleanup; correlate with mount attempts on ext4 volumes using data journaling.
- BUG: kernel NULL pointer dereference, address: 0000000000000000
- ext4_block_zero_page_range+0x30c/0x380
- ext4_truncate+0x436/0x440
- ext4_process_orphan+0x5d/0x110
- ext4_orphan_cleanup+0x124/0x4f0
- ext4_fill_super
What your security team should do
- Immediately schedule kernel updates for all systems using ext4 data journaling given the 480-day exposure window
- Add monitoring for ext4 NULL pointer dereference oops during mount and truncate
- Review and restrict use of data journaling on systems where rapid patching is difficult
- Test the fixed kernel version in staging before broad deployment
The record
In the Linux kernel, the following vulnerability has been resolved: ext4: only dirty folios when data journaling regular files fstest generic/388 occasionally reproduces a crash that looks as follows: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: <TASK> ext4_block_zero_page_range+0x30c/0x380 [ext4] ext4_truncate+0x436/0x440 [ext4] ext4_process_orphan+0x5d/0x110 [ext4] ext4_orphan_cleanup+0x124/0x4f0 [ext4] ext4_fill_super+0x262d/0x3110 [ext4] get_tree_bdev_flags+0x132/0x1d0 vfs_get_tree+0x26/0xd0 vfs_cmd_create+0x59/0xe0 __do_sys_fsconfig+0x4ed/0x6b0 do_syscall_64+0x82/0x170 ... This occurs when processing a symlink inode from the orphan list. The partial block zeroing code in the truncate path calls ext4_dirty_journalled_data() -> folio_mark_dirty(). The latter calls mapping->a_ops->dirty_folio(), but symlink inodes are not assigned an a_ops vector in ext4, hence the crash. To avoid this problem, update the ext4_dirty_journalled_data() helper to only mark the folio dirty on regular files (for which a_ops is assigned). This also matches the journaling logic in the ext4_symlink() creation path, where ext4_handle_dirty_metadata() is called directly.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | kernel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-devel-matched | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-devel-matched | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-abi-stablelists | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-cross-headers | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-devel-matched | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-debug-uki-virt | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-devel-matched | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-doc | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-headers | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-kvm | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-kvm | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-tools | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-tools-libs | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-tools-libs-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-uki-virt | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-uki-virt-addons | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-devel | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-devel-matched | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules-core | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules-extra | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | libperf | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | perf | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | python3-perf | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | rtla | 0 | 6.12.0-55.30.1.el10_0 |
| AlmaLinux:10 | rv | 0 | 6.12.0-55.30.1.el10_0 |
| Debian:13 | linux | 0 | No fix |
| Linux | Kernel | 6.4.0 | 6.6.95 |
| Mageia:9 | kernel | 0 | 6.6.101-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.101-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.10-7.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-83.mga9 |
| Mageia:9 | wireless-regdb | 0 | 20250710-1.mga9 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_14 | 0 | 1-150600.1.5.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_14 | 0 | 1-150600.13.3.4 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_3 | 0 | 1-150700.1.5.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.65.1.150600.12.28.4 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-coco_debug | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-source-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 | kernel-syms-coco | 0 | 6.4.0-15061.28.coco15sp6.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.48.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.48.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.48.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.49.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.49.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.49.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.49.1 |
| SUSE:Real Time Module 15 SP7 | kernel-rt | 0 | 6.4.0-150700.7.13.1 |
| SUSE:Real Time Module 15 SP7 | kernel-source-rt | 0 | 6.4.0-150700.7.13.1 |
| SUSE:Real Time Module 15 SP7 | kernel-syms-rt | 0 | 6.4.0-150700.7.13.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.48.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.65.1.150600.12.28.4 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.49.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.49.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.48.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.49.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.48.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.49.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.65.1 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.6.1.160000.2.4 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.6.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.6.1 |
Related vulnerabilities
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects kernel
- CVE-2025-68287 In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: Fix race… Also affects kernel
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects kernel
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects kernel
- CVE-2025-40185 In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter… Also affects kernel
- CVE-2025-40176 In the Linux kernel, the following vulnerability has been resolved: tls: wait for pending… Also affects kernel
- CVE-2025-40058 In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Disallow… Also affects kernel
- CVE-2025-40047 In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid… Also affects kernel