{"id":"CVE-2026-23238","published":"2026-03-04T14:38:42Z","modified":"2026-06-02T13:01:09Z","title":"romfs: check sb_set_blocksize() return value","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nromfs: check sb_set_blocksize() return value\n\nromfs_fill_super() ignores the return value of sb_set_blocksize(), which\ncan fail if the requested block size is incompatible with the block\ndevice's configuration.\n\nThis can be triggered by setting a loop device's block size larger than\nPAGE_SIZE using ioctl(LOOP_SET_BLOCK_SIZE, 32768), then mounting a romfs\nfilesystem on that device.\n\nWhen sb_set_blocksize(sb, ROMBSIZE) is called with ROMBSIZE=4096 but the\ndevice has logical_block_size=32768, bdev_validate_blocksize() fails\nbecause the requested size is smaller than the device's logical block\nsize. sb_set_blocksize() returns 0 (failure), but romfs ignores this and\ncontinues mounting.\n\nThe superblock's block size remains at the device's logical block size\n(32768). Later, when sb_bread() attempts I/O with this oversized block\nsize, it triggers a kernel BUG in folio_set_bh():\n\n    kernel BUG at fs/buffer.c:1582!\n    BUG_ON(size > PAGE_SIZE);\n\nFix by checking the return value of sb_set_blocksize() and failing the\nmount with -EINVAL if it returns 0.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00189,"percentile":0.04913,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/a381f0f61b35c8894b0bd0d6acef2d8f9b08b244","tags":[]},{"url":"https://git.kernel.org/stable/c/f2521ab1f63a8c244f06a080319e5ff9a2e1bd95","tags":[]},{"url":"https://git.kernel.org/stable/c/2c5829cd8fbbc91568c520b666898f57cdcb8cf6","tags":[]},{"url":"https://git.kernel.org/stable/c/cbd9931e6456822067725354d83446c5bb813030","tags":[]},{"url":"https://git.kernel.org/stable/c/9b203b8ddd7359270e8a694d0584743555128e2c","tags":[]},{"url":"https://git.kernel.org/stable/c/4b71ad7676564a94ec5f7d18298f51e8ae53db73","tags":[]},{"url":"https://git.kernel.org/stable/c/ab7ad7abb3660c58ffffdf07ff3bb976e7e0afa0","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-253495.html","tags":[]}],"priority":{"score":1.0,"factors":[{"name":"EPSS percentile","points":0.98}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < a381f0f61b35c8894b0bd0d6acef2d8f9b08b244",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < f2521ab1f63a8c244f06a080319e5ff9a2e1bd95",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2c5829cd8fbbc91568c520b666898f57cdcb8cf6",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < cbd9931e6456822067725354d83446c5bb813030",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9b203b8ddd7359270e8a694d0584743555128e2c",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 4b71ad7676564a94ec5f7d18298f51e8ae53db73",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < ab7ad7abb3660c58ffffdf07ff3bb976e7e0afa0"]},{"vendor":"Linux","product":"Linux","versions":["2.6.12"]}],"euvd":{"id":"EUVD-2026-9410","exploited":false,"provenance":"source"}}