CVE-2026-23238: romfs: check sb_set_blocksize() return value
In the Linux kernel, the following vulnerability has been resolved:
romfs: check sbsetblocksize() return value
romfsfillsuper() ignores the return value of sbsetblocksize(), 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 PAGESIZE using ioctl(LOOPSETBLOCKSIZE, 32768), then mounting a romfs filesystem on that device.
When sbsetblocksize(sb, ROMBSIZE) is called with ROMBSIZE=4096 but the device has logicalblocksize=32768, bdevvalidateblocksize() fails because the requested size is smaller than the device's logical block size. sbsetblocksize() 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 sbbread() attempts I/O with this oversized block size, it triggers a kernel BUG in foliosetbh():
kernel BUG at fs/buffer.c:1582! BUGON(size > PAGESIZE);
Fix by checking the return value of sbsetblocksize() and failing the mount with -EINVAL if it returns 0.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-23238?
CVE-2026-23238 has a moderate severity rating due to potential data corruption issues.
How do I fix CVE-2026-23238?
To fix CVE-2026-23238, update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2026-23238?
CVE-2026-23238 affects certain versions of the Linux kernel that utilize the romfs filesystem.
What is the potential impact of CVE-2026-23238?
The potential impact of CVE-2026-23238 includes system instability and possible data corruption.
Is CVE-2026-23238 being actively exploited?
As of the latest information, there are no known active exploits for CVE-2026-23238.