Summary
In the Linux kernel, XFS did not mark the inode as preallocated when a pNFS write layout ended past end of file, allowing blocks to be freed under the layout and handed to another file. The source rates it critical with a CVSS 3.1 score of 9.4.
What happened
The xfs_fs_map_blocks() function set XFS_DIFLAG_PREALLOC on the inode only when it allocated blocks for a write layout. A write layout past end of file (EOF) can also hand out already-allocated blocks, such as speculative preallocation. Background block garbage collection (blockgc) then frees them while the layout is still in use, and another file may receive them. The fix marks the inode whenever a write mapping ends past EOF.
Why it matters
The source describes that blocks freed under a live layout can end up allocated to another file. The source rates the vulnerability as critical with a CVSS 3.1 score of 9.4 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L, assigned by the Linux CNA). It is not listed as exploited in CISA's KEV catalog, and the source provides no exploitation evidence or CWE identifiers.
Affected products and versions
Linux kernel, from commit 527851124d10f9c50b1c578e0a56fcd49922422d (version 4.0) up to the listed fix commits (7d59e72920de, 82724abee43e, 760756e136db, 12fc4f754c4c, fea6d9e15570, ff7646096b6e, 2748b9277ff5, 8b8e26599155). Versions earlier than 4.0 are listed as unaffected. Versions 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.118, 6.18.64, 7.3.5 and 7.4-rc2 (and later releases in each branch) are listed as unaffected.
| Product | Versions | Fixed in |
|---|---|---|
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 7d59e72920deab04fda0741b1ab7efe06308e29c | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 82724abee43e41a42c6aa34acfc35ca532c06809 | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 760756e136db8e4d9fd7dce0bccb2593c97d326f | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 12fc4f754c4caa1fe6651b6bd5a9994cae5a4089 | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < fea6d9e15570eeb41c9e01f22f45a8498d9fe200 | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < ff7646096b6ed2ad415258bfbfb07fa6204698dc | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 2748b9277ff5e35e222b6c4d46a8285e3cf6051d | — |
| Linux Linux | >= 527851124d10f9c50b1c578e0a56fcd49922422d, < 8b8e265991556d99b6d721697f148975a7c68767 | — |
| Linux Linux | 4.0 | — |
| Linux Linux | < 4.0 | — |
| Linux Linux | 5.10.275 | 5.10.275 |
| Linux Linux | 5.15.226 | 5.15.226 |
| Linux Linux | 6.1.193 | 6.1.193 |
| Linux Linux | 6.6.163 | 6.6.163 |
| Linux Linux | 6.12.118 | 6.12.118 |
| Linux Linux | 6.18.64 | 6.18.64 |
| Linux Linux | 7.3.5 | 7.3.5 |
| Linux Linux | 7.4-rc2 | 7.4-rc2 |
Action recommended by the source
The source states the issue is resolved in versions 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.118, 6.18.64, 7.3.5 and 7.4-rc2. The fix commits are referenced on git.kernel.org (stable tree). The source does not state any additional mitigations.
Fixed in: 5.10.275, 5.15.226, 6.1.193, 6.12.118, 6.18.64, 6.6.163, 7.3.5, 7.4-rc2
Sources and references
- https://git.kernel.org/stable/c/fea6d9e15570eeb41c9e01f22f45a8498d9fe200 — CVE Program
- https://git.kernel.org/stable/c/ff7646096b6ed2ad415258bfbfb07fa6204698dc — CVE Program
- https://git.kernel.org/stable/c/2748b9277ff5e35e222b6c4d46a8285e3cf6051d — CVE Program
- https://git.kernel.org/stable/c/8b8e265991556d99b6d721697f148975a7c68767 — CVE Program
- https://git.kernel.org/stable/c/7d59e72920deab04fda0741b1ab7efe06308e29c — CVE Program
- https://git.kernel.org/stable/c/82724abee43e41a42c6aa34acfc35ca532c06809 — CVE Program
- https://git.kernel.org/stable/c/760756e136db8e4d9fd7dce0bccb2593c97d326f — CVE Program
- https://git.kernel.org/stable/c/12fc4f754c4caa1fe6651b6bd5a9994cae5a4089 — CVE Program
Relevant change history
Published
Advisory published.