ocfs2: reject FITRIM ranges shorter than a cluster
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
In the Linux kernel, the following vulnerability has been resolved: ocfs2: reject FITRIM ranges shorter than a cluster ocfs2_trim_mainbm() trims the global bitmap in cluster units, but its too-short range validation only checks sb->s_blocksize. On filesystems with a cluster size larger than the block size, a FITRIM range that is at least one block but shorter than one cluster is accepted and shifted down to len == 0. The later start + len - 1 and len -= ... arithmetic then underflows and can drive trimming past the requested range. Reject ranges shorter than s_clustersize instead. That preserves the existing -EINVAL behavior for requests that cannot discard even one allocation unit and keeps zero-cluster trims out of the group walk.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- Linux Linux
From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in d903d59c0315f59bdf0214b4f13d71c9feb2c45c; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in 441abb77222f155e8d931dbabb465466db01cfd7; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in e652d0f5108e447b22da4249bcd23dd1b63c73dd; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in 346314bb0cc2fc52b50b73d6ecc62e0217455c2e; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in 06c0a0431b9856506fcd9b2c1b0c6136567d756d; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in 3fa7139b5f42731a61f78c42433adae13f9adc21; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in 2c13e02592b918be7725ab5965e01ef4e46c4b57; From aa89762c54800208d5afdcd8e6bf124818f17fe0 · fixed in ca1afd88f5eaaff9168e1466e5401385edf59543
- Linux Linux
3.14
- KernelLinux
From 3.14.0 · fixed in 5.10.261; From 5.11.0 · fixed in 5.15.212; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5
References 8
git.kernel.org
- stable/c/d903d59c0315f59bdf0214b4f13d71c9feb2c45c
- stable/c/441abb77222f155e8d931dbabb465466db01cfd7
- stable/c/e652d0f5108e447b22da4249bcd23dd1b63c73dd
- stable/c/346314bb0cc2fc52b50b73d6ecc62e0217455c2e
- stable/c/06c0a0431b9856506fcd9b2c1b0c6136567d756d
- stable/c/3fa7139b5f42731a61f78c42433adae13f9adc21
- stable/c/2c13e02592b918be7725ab5965e01ef4e46c4b57
- stable/c/ca1afd88f5eaaff9168e1466e5401385edf59543