# CVE-2026-99395: xfs: bound inode fork length against the fork size during log recovery

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-19T14:23:33.347Z
- Modified: 2026-11-23T08:17:43.807Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

xfs: bound inode fork length against the fork size during log recovery

xlog_recover_inode_commit_pass2() copies an inode log item's data/attr
fork region into the inode buffer using the on-log region length without
bounding it against the fork capacity, e.g.:

	len = item->ri_buf[2].iov_len;
	memcpy(XFS_DFORK_DPTR(dip), src, len);

The only guard is an ASSERT, which is a no-op on production kernels
(CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy.
A crafted image with a dirty log can therefore drive a heap out-of-bounds
write at mount time. The XFS_ILOG_DBROOT sibling already passes
XFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths
did not.

Bound each logged fork region against the destination fork size before
copying it, and reject the log item with -EFSCORRUPTED when it does not
fit. Because the recovered inode is only verified after the fork data has
been copied in, the checks are done up front, before any memcpy into the
on-disk inode.

(As written by CVE List.)

## Affected

- Linux Linux: from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before 738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before f9827d457addf4a7fb089124fff01f10de83d557; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before 287bb7a11fe1053d78172f874e16873d4b20d6e5; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before af559d87fdd921b90c86125f78d8b97d754432dd; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before e2768e65a5f2f942c831e3df3b06ad7332d423e6; from 658fa68b6f34f73c7e4023489accd34c1db91cb1 before 9232301894a06e664d8de2da97175cf98419bd16; 5.8 (not affected: before 5.8; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.117 up to 6.12.*; from 6.18.61 up to 6.18.*; from 7.3.2 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a>
- <https://git.kernel.org/stable/c/f9827d457addf4a7fb089124fff01f10de83d557>
- <https://git.kernel.org/stable/c/287bb7a11fe1053d78172f874e16873d4b20d6e5>
- <https://git.kernel.org/stable/c/af559d87fdd921b90c86125f78d8b97d754432dd>
- <https://git.kernel.org/stable/c/f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe>
- <https://git.kernel.org/stable/c/e2768e65a5f2f942c831e3df3b06ad7332d423e6>
- <https://git.kernel.org/stable/c/9232301894a06e664d8de2da97175cf98419bd16>

## Sources

- CVE List: [CVE-2026-99395](https://www.cve.org/CVERecord?id=CVE-2026-99395), CVE Terms of Use, modified 2026-11-23
- NVD: [CVE-2026-99395](https://nvd.nist.gov/vuln/detail/CVE-2026-99395), Public domain, modified 2026-11-23

---

Page: https://cve.day/CVE-2026-99395 · Whole record: https://cve.day/CVE-2026-99395.json · Rebuilt by cve.day 2026-11-25T22:59:52.055Z
