CVE-2025-38141

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's device mapper (dm) subsystem when handling zoned block devices. It allows a local attacker to potentially crash the system or execute arbitrary code by triggering concurrent zone revalidation operations. Systems using zoned storage with dm-crypt or other device mapper configurations are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with vulnerable dm_blk_report_zones implementation (specific versions not specified in CVE, but patches available for stable branches)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using device mapper with zoned block devices (e.g., dm-crypt on zoned storage). Regular block devices are not affected.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to kernel compromise, system crash, or arbitrary code execution with kernel privileges.

🟠

Likely Case

Kernel panic or system crash causing denial of service, potentially leading to data corruption in zoned storage devices.

🟢

If Mitigated

Limited impact with proper access controls preventing local user access to affected systems.

🌐 Internet-Facing: LOW - This is a local vulnerability requiring access to the system.
🏢 Internal Only: MEDIUM - Internal users with shell access could exploit this to disrupt services or potentially escalate privileges.

🎯 Exploit Status

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

Exploitation requires local access and knowledge of zoned storage operations. Race condition makes timing critical.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel branches (commits: 37f53a2c60d0, d19bc1b4dd5f, f9c1bdf24615)

Vendor Advisory: https://git.kernel.org/stable/c/37f53a2c60d03743e0eacf7a0c01c279776fef4e

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. For custom kernels, apply commits 37f53a2c60d0, d19bc1b4dd5f, and f9c1bdf24615. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable zoned storage for device mapper

linux

Avoid using device mapper with zoned block devices if not required

Restrict access to block device ioctls

linux

Limit which users can perform block device operations via permissions

chmod 600 /dev/dm-*
setfacl -m u:root:rw /dev/dm-*

🧯 If You Can't Patch

  • Restrict local user access to systems using zoned storage with device mapper
  • Monitor for unusual block device operations and kernel panic logs

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if device mapper with zoned storage is in use: 'uname -r' and 'dmsetup status'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes patches: 'uname -r' should match patched version from your distribution

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Oops messages in dmesg
  • Crash reports in /var/log/messages or journalctl

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "use-after-free") AND ("dm" OR "device-mapper")

🔗 References

📤 Share & Export