{"id":"CVE-2026-99395","aliases":["CVE-2026-99395"],"related":[],"kind":"vulnerability","state":"published","title":"xfs: bound inode fork length against the fork size during log recovery","summary":"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->ri_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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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->ri_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.","source":"cvelist"}],"published":"2026-11-19T14:23:33.347Z","modified":"2026-11-23T08:17:43.807Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"f9827d457addf4a7fb089124fff01f10de83d557","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"287bb7a11fe1053d78172f874e16873d4b20d6e5","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"af559d87fdd921b90c86125f78d8b97d754432dd","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"e2768e65a5f2f942c831e3df3b06ad7332d423e6","status":"affected"},{"type":"git","introduced":"658fa68b6f34f73c7e4023489accd34c1db91cb1","fixed":"9232301894a06e664d8de2da97175cf98419bd16","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.61","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.2","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/738959d93ca51be0d9d3d15f9b5b84ac4d39fe8a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f9827d457addf4a7fb089124fff01f10de83d557","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/287bb7a11fe1053d78172f874e16873d4b20d6e5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/af559d87fdd921b90c86125f78d8b97d754432dd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e2768e65a5f2f942c831e3df3b06ad7332d423e6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9232301894a06e664d8de2da97175cf98419bd16","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99395","url":"https://www.cve.org/CVERecord?id=CVE-2026-99395","licence":"CVE Terms of Use","modified":"2026-11-23T08:02:18.415Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99395","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99395","licence":"Public domain","modified":"2026-11-23T08:17:43.807Z"}],"updatedAt":"2026-11-25T22:59:52.055Z","epss":{"score":0.0021,"percentile":0.11832,"date":"2026-12-01T12:00:22.000Z"}}