CVE-2026-139436

block: take i_rwsem for the splice read path

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

block: take i_rwsem for the splice read path

def_blk_fops wires ->splice_read directly to filemap_splice_read(),
which allocates folios based on mapping_min_folio_order() without any
lock against set_blocksize(). A splice from a block device can race
set_blocksize() raising the minimum folio order and insert a folio that
is too small for the mapping. blkdev_read_iter() wraps filemap_read()
in inode_lock_shared() for this reason, but the splice path was missed.

Splicing from a block device while toggling the block size between 512
bytes and 64K with BLKBSZSET hits this within seconds on a
CONFIG_DEBUG_VM kernel:

page dumped because: VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping))
kernel BUG at mm/filemap.c:858!
Oops: invalid opcode: 0000 [#1] SMP NOPTI
RIP: 0010:__filemap_add_folio+0x51c/0x570
Call Trace:
filemap_add_folio+0x64/0x140
page_cache_ra_order+0x1dd/0x3d0
filemap_get_pages+0x153/0x760
filemap_splice_read+0x13f/0x300
splice_file_to_pipe+0xc0/0xd0
do_splice+0x6a8/0x890
__do_splice+0xb0/0x210
__x64_sys_splice+0x80/0x100
do_syscall_64+0x10e/0x520
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Take inode_lock_shared() around filemap_splice_read(), like the read
path does.

Analysis

AI-generated

Technical impact

In the Linux kernel the splice read path failed to acquire the inode lock that protects against concurrent changes to a block device’s size. When a splice operation reads from a block device while the BLKBSZSET ioctl toggles the block size between 512 bytes and 64 KiB, this race triggers a VM_BUG_ON in filemap.c, causing an out‑of‑bounds fault and a kernel panic. The result is an immediate denial of service on the affected node and potential stability issues for any process on the host.

Affected Systems

All Linux kernel builds that have not incorporated the patch that adds i_rwsem locking to the splice read path are affected. The vulnerability is present in the upstream kernel as reported by the commit history links provided and therefore impacts any distribution kernel that has not applied this change, regardless of release level. Specific version numbers are not listed in the advisory.

Risk and Exploitability

A local attacker that can trigger a splice read from a block device and has the ability to issue the BLKBSZSET ioctl can exploit this race. Based on the description, it is inferred that this requires that the attacker have local access to the device and sufficient privileges to call BLKBSZSET, which many distributions restrict to privileged users. The exact need for privileged access depends on the target kernel’s permission model for BLKBSZSET; many distributions restrict that ioctl to privileged users. The CVSS score is not supplied, and no EPSS data is available, indicating an uncertain but non‑zero likelihood of exploitation. The vulnerability is not listed as a Known Exploited Vulnerability, which suggests that, while exploitable, it has not yet been observed in the wild. Nonetheless, the crash impact justifies treating it as a moderate‑to‑high risk for systems that rely on kernel stability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that includes the i_rwsem lock fix for the splice read path
  • If an immediate update is not possible, avoid performing splice reads from block devices while changing the block size with BLKBSZSET or restrict BLKBSZSET to privileged users
  • Monitor /var/log/kern.log or dmesg for VM_BUG_ON or panic messages that indicate a race condition has been triggered

Generated by OpenCVE AI on December 1, 2026 at 05:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-366
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-362
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: block: take i_rwsem for the splice read path def_blk_fops wires ->splice_read directly to filemap_splice_read(), which allocates folios based on mapping_min_folio_order() without any lock against set_blocksize(). A splice from a block device can race set_blocksize() raising the minimum folio order and insert a folio that is too small for the mapping. blkdev_read_iter() wraps filemap_read() in inode_lock_shared() for this reason, but the splice path was missed. Splicing from a block device while toggling the block size between 512 bytes and 64K with BLKBSZSET hits this within seconds on a CONFIG_DEBUG_VM kernel: page dumped because: VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping)) kernel BUG at mm/filemap.c:858! Oops: invalid opcode: 0000 [#1] SMP NOPTI RIP: 0010:__filemap_add_folio+0x51c/0x570 Call Trace: filemap_add_folio+0x64/0x140 page_cache_ra_order+0x1dd/0x3d0 filemap_get_pages+0x153/0x760 filemap_splice_read+0x13f/0x300 splice_file_to_pipe+0xc0/0xd0 do_splice+0x6a8/0x890 __do_splice+0xb0/0x210 __x64_sys_splice+0x80/0x100 do_syscall_64+0x10e/0x520 entry_SYSCALL_64_after_hwframe+0x77/0x7f Take inode_lock_shared() around filemap_splice_read(), like the read path does.
Title block: take i_rwsem for the splice read path
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-366

    Race Condition within a Thread

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:34 PM