Description
In the Linux kernel, the following vulnerability has been resolved:

romfs: check sb_set_blocksize() return value

romfs_fill_super() ignores the return value of sb_set_blocksize(), which
can fail if the requested block size is incompatible with the block
device's configuration.

This can be triggered by setting a loop device's block size larger than
PAGE_SIZE using ioctl(LOOP_SET_BLOCK_SIZE, 32768), then mounting a romfs
filesystem on that device.

When sb_set_blocksize(sb, ROMBSIZE) is called with ROMBSIZE=4096 but the
device has logical_block_size=32768, bdev_validate_blocksize() fails
because the requested size is smaller than the device's logical block
size. sb_set_blocksize() returns 0 (failure), but romfs ignores this and
continues mounting.

The superblock's block size remains at the device's logical block size
(32768). Later, when sb_bread() attempts I/O with this oversized block
size, it triggers a kernel BUG in folio_set_bh():

kernel BUG at fs/buffer.c:1582!
BUG_ON(size > PAGE_SIZE);

Fix by checking the return value of sb_set_blocksize() and failing the
mount with -EINVAL if it returns 0.
Published: 2026-03-04
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Patch
AI Analysis

Impact

The Linux kernel’s romfs implementation fails to honor the return value from sb_set_blocksize(). When a device with a larger logical block size is used, the function reports failure but romfs continues, leaving the superblock with an oversized block size. Subsequent reads trigger a kernel BUG, crashing the system. This leads to a denial of service. The weakness is an unchecked return value (CWE-617).

Affected Systems

All kernels that contain the unpatched romfs code, including the 2.6.12 release candidates (2.6.12 rc1–rc5) and the 6.19 release candidates (6.19 rc1–rc7) listed by the CPE entries, are affected. The fix is already present in stable kernel releases newer than those versions.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, while the EPSS score of less than 1% suggests a low exploitation likelihood. The attack requires local privilege to configure a loop device with the ioctl(LOOP_SET_BLOCK_SIZE) call, which normally requires root or equivalent capability. Once the device is prepared, mounting a romfs filesystem on it will crash the kernel. The vulnerability does not provide remote code execution or data exfiltration; it simply produces a kernel crash.

Generated by OpenCVE AI on April 17, 2026 at 13:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to a kernel version that includes the romfs block‑size check patch. Distribution maintainers typically bundle the fix in the latest releases; apply the vendor’s security update.
  • If patching cannot be applied immediately, manually recompile the kernel with the patch that adds the return‑value check (for example, cherry‑picking commit 2c5829cd8fbbc91568c520b666898f57cdcb8cf6) and install the updated kernel.
  • As a temporary workaround, avoid mounting romfs on loop devices that have been configured with a block size larger than the system’s PAGE_SIZE; ensure any loop device used for romfs has a block size of 4096 bytes or less before mounting, or restrict loop device modifications to privileged users only.

Generated by OpenCVE AI on April 17, 2026 at 13:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4498-1 linux security update
Debian DLA Debian DLA DLA-4499-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6163-1 linux security update
Debian DSA Debian DSA DSA-6162-1 linux security update
History

Tue, 17 Mar 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-617
CPEs cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*

Thu, 05 Mar 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Wed, 04 Mar 2026 14:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: romfs: check sb_set_blocksize() return value romfs_fill_super() ignores the return value of sb_set_blocksize(), which can fail if the requested block size is incompatible with the block device's configuration. This can be triggered by setting a loop device's block size larger than PAGE_SIZE using ioctl(LOOP_SET_BLOCK_SIZE, 32768), then mounting a romfs filesystem on that device. When sb_set_blocksize(sb, ROMBSIZE) is called with ROMBSIZE=4096 but the device has logical_block_size=32768, bdev_validate_blocksize() fails because the requested size is smaller than the device's logical block size. sb_set_blocksize() returns 0 (failure), but romfs ignores this and continues mounting. The superblock's block size remains at the device's logical block size (32768). Later, when sb_bread() attempts I/O with this oversized block size, it triggers a kernel BUG in folio_set_bh(): kernel BUG at fs/buffer.c:1582! BUG_ON(size > PAGE_SIZE); Fix by checking the return value of sb_set_blocksize() and failing the mount with -EINVAL if it returns 0.
Title romfs: check sb_set_blocksize() return value
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-03-08T10:07:34.991Z

Reserved: 2026-01-13T15:37:45.989Z

Link: CVE-2026-23238

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-03-04T15:16:14.530

Modified: 2026-03-17T21:15:39.097

Link: CVE-2026-23238

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-03-04T00:00:00Z

Links: CVE-2026-23238 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-17T13:15:19Z

Weaknesses