Cloudanix VulnDB

CVE-2025-38073

None

CVSS

—

EPSS

—

Published

Jun 18, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel can make the computer crash when programs read from a disk at the same time someone tries to mount a special kind of disk.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Race condition between set_blocksize (which updates i_blksize and minimum folio order) and concurrent read paths that allocate order-0 folios; when block size changes to a larger value, do_mpage_readahead computes blocks_per_folio==0, produces a bio with NULL bdev, and triggers a kernel crash.

Why it matters to the business

Unprivileged local users or automated device-probing processes can trigger kernel panics on Linux systems that use block devices, causing denial of service, unexpected reboots, and potential data corruption or loss of availability for storage-dependent services.

How an attack unfolds

An attacker with local access triggers udev or libblkid to perform a small read on a block device, then quickly initiates a mount of an 8 KB sector-size filesystem on the same device; the resulting race between the read folio and set_blocksize update produces an invalid bio that crashes the kernel.

How to fix it

Upgrade the Linux kernel to a fixed version (6.1.159 or later stable releases containing commit 311427c9384d93ce01f6375a83f93c1c18f7cabe); rebuild and reboot into the patched kernel; for distributions such as Mageia 5 update chrony to 1.31.2-1.mga5 or later.

How to confirm the fix worked

Confirm the running kernel contains the fix commit or reports version 6.1.159+; attempt to reproduce the original race scenario under controlled conditions and verify no crash occurs; inspect dmesg and kernel logs for absence of NULL bdev or folio-order mismatch warnings.

Typical attack path

  1. Obtain local shell or trigger device-probing activity (udev/libblkid).
  2. Cause a small read that allocates an order-0 folio on the target block device.
  3. Concurrently perform a mount or set_blocksize operation for a larger sector size.
  4. Trigger the race window that leaves the bio with a NULL bdev.
  5. Submit the malformed bio to induce kernel panic.

How to detect it

Search kernel logs and crash dumps for messages indicating NULL block device in bio submission, blocks_per_folio==0, or folio-order mismatches during set_blocksize; correlate with udev-worker or mount activity on the same block device around the time of the panic.

What your security team should do

  • Prioritize kernel updates on all systems exposing block devices to untrusted local users.
  • Apply the patch or distribution update before the CISA remediation window if the CVE is later added to KEV.
  • Restrict local unprivileged access to block devices where feasible until patches are deployed.
  • Monitor kernel crash reports and udev activity for anomalous patterns during the update rollout.

The record

In the Linux kernel, the following vulnerability has been resolved: block: fix race between set_blocksize and read paths With the new large sector size support, it's now the case that set_blocksize can change i_blksize and the folio order in a manner that conflicts with a concurrent reader and causes a kernel crash. Specifically, let's say that udev-worker calls libblkid to detect the labels on a block device. The read call can create an order-0 folio to read the first 4096 bytes from the disk. But then udev is preempted. Next, someone tries to mount an 8k-sectorsize filesystem from the same block device. The filesystem calls set_blksize, which sets i_blksize to 8192 and the minimum folio order to 1. Now udev resumes, still holding the order-0 folio it allocated. It then tries to schedule a read bio and do_mpage_readahead tries to create bufferheads for the folio. Unfortunately, blocks_per_folio == 0 because the page size is 4096 but the blocksize is 8192 so no bufferheads are attached and the bh walk never sets bdev. We then submit the bio with a NULL block device and crash. Therefore, truncate the page cache after flushing but before updating i_blksize. However, that's not enough -- we also need to lock out file IO and page faults during the update. Take both the i_rwsem and the invalidate_lock in exclusive mode for invalidations, and in shared mode for read/write operations. I don't know if this is the correct fix, but xfs/259 found it.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:12 linux 0 No fix
Debian:13 linux 0 6.12.32-1
Linux Kernel 0 6.1.159
Linux Kernel 0 6.12.31

Related vulnerabilities