{"id":"CVE-2026-99448","aliases":["CVE-2026-99448"],"related":[],"kind":"vulnerability","state":"published","title":"ufs: use u64 for directory size in ufs_last_byte","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nufs: use u64 for directory size in ufs_last_byte\n\nufs1_read_inode() and ufs2_read_inode() copy the untrusted 64-bit\non-disk size into inode->i_size.  ufs_last_byte() then truncates that\nvalue to an unsigned int before calculating the valid extent of a\ndirectory folio.\n\nA directory size of exactly 4 GiB is truncated to zero.  In\nufs_find_entry(), subtracting the requested record length from that zero\nforms an endpoint almost 4 GiB beyond the mapped folio.  A crafted UFS2\nimage produces:\n\n  BUG: KASAN: use-after-free in ufs_find_entry+0x583/0x6e0 [ufs]\n  Read of size 1\n  ...\n  ufs_find_entry\n  ufs_inode_by_name\n  ufs_lookup\n  __lookup_slow\n  path_lookupat\n\nThe KASAN classification reflects that the adjacent physical page was\nfree; the source-level operation is an out-of-folio read.  A controlled\nUFS1 test with CONFIG_UFS_FS_WRITE enabled also made ufs_find_entry()\nreturn a directory entry from an adjacent anonymous page.  unlink() then\npassed that pointer to ufs_delete_entry(), which cleared the adjacent\npage's 3\n2-bit d_ino.  This write result reproduced three out of three\ntimes.\n\nUFS normally requires a privileged mount path.  A relevant boundary is\na privileged automounter or image-processing service handling an\nattacker-supplied filesystem.  The write primitive additionally requires\nUFS1 to be mounted read-write with CONFIG_UFS_FS_WRITE enabled; the read\nis reachable with read-only UFS2.\n\nKeep the intermediate size arithmetic at 64 bits so non-final pages are\nbounded at PAGE_SIZE.  With this change, the same controlled tests reach\nthe real on-disk directory entry and produce no adjacent-page write or\nKASAN report.  A reproducer and full validation logs are available on\nrequest.\n\nThe vulnerable helper is present in v7.2-rc3, v7.1, v6.18.38, v6.12.95,\nv6.6.111, and upstream master at 1229e2e57a5c.  Runtime reproduction and\nfix validation were performed in an x86-64 QEMU guest running v7.2-rc3\nwith generic KASAN.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nufs: use u64 for directory size in ufs_last_byte\n\nufs1_read_inode() and ufs2_read_inode() copy the untrusted 64-bit\non-disk size into inode->i_size.  ufs_last_byte() then truncates that\nvalue to an unsigned int before calculating the valid extent of a\ndirectory folio.\n\nA directory size of exactly 4 GiB is truncated to zero.  In\nufs_find_entry(), subtracting the requested record length from that zero\nforms an endpoint almost 4 GiB beyond the mapped folio.  A crafted UFS2\nimage produces:\n\n  BUG: KASAN: use-after-free in ufs_find_entry+0x583/0x6e0 [ufs]\n  Read of size 1\n  ...\n  ufs_find_entry\n  ufs_inode_by_name\n  ufs_lookup\n  __lookup_slow\n  path_lookupat\n\nThe KASAN classification reflects that the adjacent physical page was\nfree; the source-level operation is an out-of-folio read.  A controlled\nUFS1 test with CONFIG_UFS_FS_WRITE enabled also made ufs_find_entry()\nreturn a directory entry from an adjacent anonymous page.  unlink() then\npassed that pointer to ufs_delete_entry(), which cleared the adjacent\npage's 3\n2-bit d_ino.  This write result reproduced three out of three\ntimes.\n\nUFS normally requires a privileged mount path.  A relevant boundary is\na privileged automounter or image-processing service handling an\nattacker-supplied filesystem.  The write primitive additionally requires\nUFS1 to be mounted read-write with CONFIG_UFS_FS_WRITE enabled; the read\nis reachable with read-only UFS2.\n\nKeep the intermediate size arithmetic at 64 bits so non-final pages are\nbounded at PAGE_SIZE.  With this change, the same controlled tests reach\nthe real on-disk directory entry and produce no adjacent-page write or\nKASAN report.  A reproducer and full validation logs are available on\nrequest.\n\nThe vulnerable helper is present in v7.2-rc3, v7.1, v6.18.38, v6.12.95,\nv6.6.111, and upstream master at 1229e2e57a5c.  Runtime reproduction and\nfix validation were performed in an x86-64 QEMU guest running v7.2-rc3\nwith generic KASAN.","source":"cvelist"}],"published":"2026-11-19T14:41:37.703Z","modified":"2026-11-23T08:17:48.600Z","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":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"c43f74f9a7418790f4e28bb94c1423be3ed6b22d","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"119344a21852412d867c499457b4111a0fb967f1","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"36b76a83cd622dfd52878c67437d6c3f55c44667","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"627b432794b1114ab2934f6ae6199d789842cb37","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"ae50223c56b9a1c27d4f824c9e2fbbefc8686891","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"c792858491ee39e8f6e1547c45422595cf25b415","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"ac2859c61ecf52a9e39b44b35c981dbfeb8ad54b","status":"affected"},{"type":"git","introduced":"b71034e5e67d1577424cebe7bbb7d0ce134a4cd8","fixed":"1eff23433e73d7da4f9e3529d2701e34962b161f","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.18","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","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/c43f74f9a7418790f4e28bb94c1423be3ed6b22d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/119344a21852412d867c499457b4111a0fb967f1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/36b76a83cd622dfd52878c67437d6c3f55c44667","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/627b432794b1114ab2934f6ae6199d789842cb37","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ae50223c56b9a1c27d4f824c9e2fbbefc8686891","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c792858491ee39e8f6e1547c45422595cf25b415","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ac2859c61ecf52a9e39b44b35c981dbfeb8ad54b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1eff23433e73d7da4f9e3529d2701e34962b161f","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99448","url":"https://www.cve.org/CVERecord?id=CVE-2026-99448","licence":"CVE Terms of Use","modified":"2026-11-23T08:02:56.638Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99448","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99448","licence":"Public domain","modified":"2026-11-23T08:17:48.600Z"}],"updatedAt":"2026-11-25T22:59:52.074Z","epss":{"score":0.00179,"percentile":0.07761,"date":"2026-12-02T12:00:21.000Z"}}