CVE-2025-38220

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in the Linux kernel's ext4 filesystem can cause kernel crashes when processing orphaned symlink inodes. This affects Linux systems using ext4 with data journaling enabled. The vulnerability is triggered during orphan cleanup operations.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific kernel versions containing the vulnerable ext4 code (check git commits for exact ranges)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only affects systems using ext4 filesystem with data journaling enabled. Symlink inodes must be orphaned and processed during cleanup.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash and denial of service, potentially causing data corruption or loss if the crash occurs during critical filesystem operations.

🟠

Likely Case

System crash or kernel panic when orphaned symlink inodes are processed during filesystem operations, resulting in temporary denial of service.

🟢

If Mitigated

No impact if the system is patched or doesn't use ext4 with data journaling for symlinks.

🌐 Internet-Facing: LOW - This is a local filesystem vulnerability requiring local access or specific filesystem operations.
🏢 Internal Only: MEDIUM - Could be triggered by legitimate system operations or malicious local users, causing system instability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires specific conditions: ext4 with data journaling, orphaned symlink inodes, and triggering orphan cleanup. Likely discovered through fstest generic/388 testing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits: be5f3061a6f904e3674257879e71881ceee5b673, cf6a4c4ac7b6e3214f25df594c9689a62f1bb456, d7af6eee8cd60f55aa8c5fe2b91f11ec0c9a0f27, e26268ff1dcae5662c1b96c35f18cfa6ab73d9de

Vendor Advisory: https://git.kernel.org/stable/c/be5f3061a6f904e3674257879e71881ceee5b673

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.

🔧 Temporary Workarounds

Disable data journaling for ext4

linux

Mount ext4 filesystems without data journaling (use journal=ordered or journal=writeback)

mount -o remount,journal=ordered /mount/point
Add 'journal=ordered' to /etc/fstab for ext4 partitions

Avoid orphaned symlinks

linux

Ensure proper filesystem cleanup and avoid abrupt system shutdowns that could leave orphaned inodes

🧯 If You Can't Patch

  • Monitor system logs for kernel panic/crash events related to ext4
  • Implement strict access controls to prevent local users from creating/manipulating symlinks in sensitive areas

🔍 How to Verify

Check if Vulnerable:

Check if running kernel version contains vulnerable ext4 code. Run: uname -r and compare with affected versions. Check if ext4 filesystems use data journaling: mount | grep ext4

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update matches patched version. Check that ext4_dirty_journalled_data() helper properly handles symlink inodes.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning ext4_block_zero_page_range
  • NULL pointer dereference errors in kernel logs
  • Filesystem corruption errors

Network Indicators:

  • None - this is a local filesystem vulnerability

SIEM Query:

source="kernel" AND ("ext4_block_zero_page_range" OR "NULL pointer dereference" AND "ext4")

🔗 References

📤 Share & Export