Cloudanix VulnDB

CVE-2025-38141

None

CVSS

—

EPSS

0.2%

Published

Jul 3, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in the Linux kernel's handling of certain storage devices could let memory be used after it was already freed, risking crashes or security issues on affected systems.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Full Compromise
Component
OS kernel
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Use-after-free in dm_blk_report_zones when dm_get_live_table returns NULL or when md->zone_revalidate_map is accessed concurrently during blk_revalidate_disk_zones setup on suspended zoned DM devices, allowing a freed zone resource to be dereferenced.

Why it matters to the business

Systems using zoned device-mapper targets such as dm-crypt may experience kernel crashes, memory corruption, or local privilege escalation; the packages shipping the fix affect database operator deployments and require prompt kernel or package updates.

How an attack unfolds

An attacker with local access triggers concurrent calls to blk_revalidate_disk_zones and dm_blk_report_zones (for example via blkdev_report_zones_ioctl) on a suspended zoned DM device; if the revalidation fails, the freed resources are accessed by the reporting path, resulting in use-after-free.

How to fix it

Upgrade to a kernel containing commit f9c1bdf24615303d48a2d0fd629c88f3189563aa or later; for the listed operator packages update to version 25.2.1.0-r1 or newer; rebuild and reboot systems using affected DM configurations.

How to confirm the fix worked

Confirm the running kernel contains commit f9c1bdf24615303d48a2d0fd629c88f3189563aa; verify package versions match the fixed releases; test zoned DM device creation and zone reporting under load to ensure no crashes occur during table revalidation.

Typical attack path

  1. Obtain local access on a system with zoned DM targets
  2. Create or manipulate a zoned dm-crypt or similar table while the device is suspended
  3. Race blk_revalidate_disk_zones with dm_blk_report_zones calls
  4. Trigger failure path in revalidation to free resources still in use
  5. Exploit the resulting use-after-free for memory corruption or code execution

How to detect it

Review kernel logs for oops or use-after-free warnings involving dm_blk_report_zones or zone_revalidate_map; inspect process activity around blkdev_report_zones_ioctl and blk_revalidate_disk_zones on systems with zoned DM devices; no widespread in-the-wild exploitation indicators are known.

What your security team should do

  • Prioritize patching kernel and affected operator packages within the next maintenance window
  • Identify hosts using zoned DM targets and schedule reboots after updates
  • Monitor for any downstream dependents that consume the vulnerable kernel packages
  • Add the fixed commit hash to internal vulnerability scanners

The record

In the Linux kernel, the following vulnerability has been resolved: dm: fix dm_blk_report_zones If dm_get_live_table() returned NULL, dm_put_live_table() was never called. Also, it is possible that md->zone_revalidate_map will change while calling this function. Only read it once, so that we are always using the same value. Otherwise we might miss a call to dm_put_live_table(). Finally, while md->zone_revalidate_map is set and a process is calling blk_revalidate_disk_zones() to set up the zone append emulation resources, it is possible that another process, perhaps triggered by blkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If blk_revalidate_disk_zones() fails, these resources can be freed while the other process is still using them, causing a use-after-free error. blk_revalidate_disk_zones() will only ever be called when initially setting up the zone append emulation resources, such as when setting up a zoned dm-crypt table for the first time. Further table swaps will not set md->zone_revalidate_map or call blk_revalidate_disk_zones(). However it must be called using the new table (referenced by md->zone_revalidate_map) and the new queue limits while the DM device is suspended. dm_blk_report_zones() needs some way to distinguish between a call from blk_revalidate_disk_zones(), which must be allowed to use md->zone_revalidate_map to access this not yet activated table, and all other calls to dm_blk_report_zones(), which should not be allowed while the device is suspended and cannot use md->zone_revalidate_map, since the zone resources might be freed by the process currently calling blk_revalidate_disk_zones(). Solve this by tracking the process that sets md->zone_revalidate_map in dm_revalidate_zones() and only allowing that process to make use of it in dm_blk_report_zones().

Affected packages

Ecosystem Package Introduced Fixed
Debian:13 linux 0 No fix
Linux Kernel 6.10.0 6.12.34
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