fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a3ab7155ea21aadc8a4d5687e91b3d876973185e · < 6561afc38398e3518a29c5eebb975c30468f98a6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
omfs_fill_super() rejects oversized s_sys_blocksize values (> PAGE_SIZE), but it does not reject values smaller than OMFS_DIR_START (0x1b8 = 440).
Later, omfs_make_empty() uses
sbi->s_sys_blocksize - OMFS_DIR_START
as the length argument to memset(). Since s_sys_blocksize is u32, a crafted filesystem image with s_sys_blocksize < OMFS_DIR_START causes an unsigned underflow there, wrapping to a value near 2^32. That drives a ~4 GiB memset() from bh->b_data + OMFS_DIR_START and overwrites kernel memory far beyond the backing block buffer.
Add the corresponding lower-bound check alongside the existing upper-bound check in omfs_fill_super(), so that malformed images are rejected during superblock validation before any filesystem data is processed.
From the CVE record · Linux
The Linux kernel’s OMFS filesystem does not reject a system block size below 440 bytes. A crafted filesystem image with that value can cause an unsigned underflow and a roughly 4 GiB memory overwrite when the filesystem is processed. Exploitation requires the crafted image to be mounted; the input does not specify authentication requirements.
Engineers running Linux kernels with OMFS support should check their deployments; affected versions are not specified.