{"id":"CVE-2026-99395","summary":"xfs: bound inode fork length against the fork size during log recovery","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: bound inode fork length against the fork size during log recovery\n\nxlog_recover_inode_commit_pass2() copies an inode log item's data/attr\nfork region into the inode buffer using the on-log region length without\nbounding it against the fork capacity, e.g.:\n\n\tlen = item-\u003eri_buf[2].iov_len;\n\tmemcpy(XFS_DFORK_DPTR(dip), src, len);\n\nThe only guard is an ASSERT, which is a no-op on production kernels\n(CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy.\nA crafted image with a dirty log can therefore drive a heap out-of-bounds\nwrite at mount time. The XFS_ILOG_DBROOT sibling already passes\nXFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths\ndid not.\n\nBound each logged fork region against the destination fork size before\ncopying it, and reject the log item with -EFSCORRUPTED when it does not\nfit. Because the recovered inode is only verified after the fork data has\nbeen copied in, the checks are done up front, before any memcpy into the\non-disk inode.","modified":"2026-11-19T17:00:42.637671007Z","published":"2026-11-19T14:23:33.347Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99395.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9232301894a06e664d8de2da97175cf98419bd16"},{"type":"WEB","url":"https://git.kernel.org/stable/c/af559d87fdd921b90c86125f78d8b97d754432dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e2768e65a5f2f942c831e3df3b06ad7332d423e6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99395.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99395"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1"},{"fixed":"af559d87fdd921b90c86125f78d8b97d754432dd"},{"fixed":"f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe"},{"fixed":"e2768e65a5f2f942c831e3df3b06ad7332d423e6"},{"fixed":"9232301894a06e664d8de2da97175cf98419bd16"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99395.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.61"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99395.json"}}],"schema_version":"1.9.2"}