CVE-2025-38140
NoneCVSS
—
EPSS
0.2%
Published
Jul 3, 2025
CISA due date
—
Cloudanix analysis
A Linux storage-handling bug could let attackers crash systems or corrupt memory when certain advanced disk setups are reconfigured.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
In the Linux kernel device-mapper (dm) subsystem, dm_revalidate_zones() skips blk_revalidate_disk_zones() for already-zoned devices, allowing table swaps that change zoned settings or sizes on devices with zone write plugs; this leaves disk->conv_zones_bitmap and disk->nr_zones inconsistent, enabling out-of-bounds reads (for example in bdev_zone_is_seq()) or corruption of nr_zones values.
Why it matters to the business
Enterprises using zoned block devices (ZNS/SMR) with device-mapper targets that allocate zone write plug resources face risk of kernel memory corruption or crashes during table reloads, resulting in storage stack downtime, potential data unavailability, and the need for urgent kernel updates across fleets.
How an attack unfolds
An attacker who can trigger or control device-mapper table reloads (via udev, multipath, or privileged storage configuration) supplies a new table that alters zone emulation, device size, or zone size on a device already possessing zone write plug resources; the resulting bitmap or nr_zones mismatch is then dereferenced by zoned I/O paths, producing invalid memory access.
How to fix it
Upgrade the Linux kernel to a revision containing commit ac8acb0bfd98a1c65f3ca9a3e217a766124eebd8 or later; for packaged distributions apply the fixed kyverno-policy-reporter releases 3.1.4-r2 (Chainguard/Wolfi) or equivalent; restrict dm table reloads that alter zoned geometry on devices with zone write plugs until patched.
How to confirm the fix worked
Confirm the running kernel contains the referenced commit; attempt a dm table reload that would change zoned settings on a device with zone write plugs and verify the operation is now rejected; inspect /sys/block/<dev>/queue/nr_zones and zoned attributes before and after any allowed reloads to ensure they remain consistent.
Typical attack path
- Obtain privileges sufficient to reload a device-mapper table on a zoned device that uses zone write plugs
- Issue a table swap that changes zoned parameters, device capacity, or zone size
- Trigger zoned I/O or zone-status queries that invoke bdev_zone_is_seq() or similar helpers
- Observe or exploit the resulting invalid memory read or kernel fault
How to detect it
Review kernel logs (dmesg, journalctl) for oops/panic messages referencing dm_revalidate_zones, blk_revalidate_disk_zones, conv_zones_bitmap, or bdev_zone_is_seq around the time of dm table reload events; correlate with audit logs showing dmsetup table loads or udev-triggered table swaps on zoned devices.
What your security team should do
- Prioritize kernel updates on all systems exposing zoned block devices through device-mapper
- Audit storage configurations for use of zone write plugs and limit table-swap privileges
- Monitor EPSS trend and kernel mailing list for any subsequent exploit reports
- Test patched kernels in staging environments that replicate zoned storage workloads before broad deployment
The record
In the Linux kernel, the following vulnerability has been resolved: dm: limit swapping tables for devices with zone write plugs dm_revalidate_zones() only allowed new or previously unzoned devices to call blk_revalidate_disk_zones(). If the device was already zoned, disk->nr_zones would always equal md->nr_zones, so dm_revalidate_zones() returned without doing any work. This would make the zoned settings for the device not match the new table. If the device had zone write plug resources, it could run into errors like bdev_zone_is_seq() reading invalid memory because disk->conv_zones_bitmap was the wrong size. If the device doesn't have any zone write plug resources, calling blk_revalidate_disk_zones() will always correctly update device. If blk_revalidate_disk_zones() fails, it can still overwrite or clear the current disk->nr_zones value. In this case, DM must restore the previous value of disk->nr_zones, so that the zoned settings will continue to match the previous value that it fell back to. If the device already has zone write plug resources, blk_revalidate_disk_zones() will not correctly update them, if it is called for arbitrary zoned device changes. Since there is not much need for this ability, the easiest solution is to disallow any table reloads that change the zoned settings, for devices that already have zone plug resources. Specifically, if a device already has zone plug resources allocated, it can only switch to another zoned table that also emulates zone append. Also, it cannot change the device size or the zone size. A device can switch to an error target.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | hyperv-daemons-6.12 | 0 | 6.12.58-r1 |
| Chainguard | linux-aws-6.12-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-fips-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-headers | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-modules | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12-boot-installed | 0 | 6.12.58-r1 |
| Chainguard | linux-azure-6.12-fips-boot-installed | 0 | 6.12.60-r1 |
| Chainguard | linux-azure-6.12-headers | 0 | 6.12.60-r2 |
| Chainguard | linux-azure-6.12-modules | 0 | 6.12.58-r1 |
| Chainguard | linux-gcp-6.12-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-fips-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-headers | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-modules | 0 | 6.12.58-r0 |
| Chainguard | linux-qemu-6.12-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-fips-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-headers | 0 | 6.12.63-r0 |
| Chainguard | linux-qemu-6.12-modules | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12 | 0 | 6.12.67-r0 |
| Chainguard | linux-vmware-6.12-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-fips-boot-installed | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-headers | 0 | 6.12.63-r0 |
| Chainguard | linux-vmware-6.12-modules | 0 | 6.12.63-r0 |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:14 | linux | 0 | 6.16.3-1 |
| Linux | Kernel | 5.14.0 | 6.15.3 |
| 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-39910 In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan… Also affects hyperv-daemons-6.12
- CVE-2025-39925 can: j1939: implement NETDEV_UNREGISTER notification handler Also affects hyperv-daemons-6.12
- CVE-2025-39905 net: phylink: add lock for serializing concurrent pl->phydev writes with resolver Also affects hyperv-daemons-6.12
- CVE-2025-39862 In the Linux kernel, the following vulnerability has been resolved: wifi: mt76: mt7915… Also affects hyperv-daemons-6.12
- CVE-2025-39859 In the Linux kernel, the following vulnerability has been resolved: ptp: ocp: fix… Also affects hyperv-daemons-6.12
- CVE-2025-39834 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39830 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39833 In the Linux kernel, the following vulnerability has been resolved: mISDN: hfcpci: Fix… Also affects hyperv-daemons-6.12