CVE-2026-99395: xfs: bound inode fork length against the fork size during log recovery
In the Linux kernel, the following vulnerability has been resolved:
xfs: bound inode fork length against the fork size during log recovery
xlogrecoverinodecommitpass2() 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->ribuf[2].iovlen; memcpy(XFSDFORKDPTR(dip), src, len);
The only guard is an ASSERT, which is a no-op on production kernels (CONFIGXFSDEBUG off), and xfsdinodeverify() 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 XFSILOGDBROOT sibling already passes XFSDFORKDSIZE 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Compensating control
During XFS log recovery in xlog_recover_inode_commit_pass2(), bound each logged data/attribute fork region against its destination fork capacity before copying; reject the log item with -EFSCORRUPTED if it does not fit.