{"id":"CVE-2026-139216","aliases":["CVE-2026-139216"],"related":[],"kind":"vulnerability","state":"published","title":"ntfs: fix u16 truncation of the update sequence array count check","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: fix u16 truncation of the update sequence array count check\n\nntfs_check_restart_page_header() bounds the on-disk system page size by\nrecomputing the update sequence array count from it:\n\n\tu16 ra_ofs, usa_count, usa_ofs, usa_end = 0;\n\t...\n\tusa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS);\n\tif (usa_count != le16_to_cpu(rp->usa_count))\n\t\treturn false;\n\nThe right hand side is computed in u32 but stored in a u16, so the count\nwraps once the system page size reaches 0x2000000.  An image claiming any\nlarger power of two passes the check by also claiming usa_count == 1.\n\nNothing else limits the value, so ntfs_check_and_load_restart_page() goes\non to kvzalloc() up to 2 GiB for the restart page and copy that many bytes\na page at a time.  The size is only rejected afterwards, by the\n(size >> NTFS_BLOCK_SIZE_BITS) != usa_count test in post_read_mst_fixup().\n\nCompute the count in a u32 so the existing check rejects an over-large\nsystem page size instead of being defeated by the truncation.  This adds\nno new limit: the array holds one u16 per protected sector plus the update\nsequence number and must end within the first sector, which caps usa_count\nat 240 and the system page size at 64 KiB.\n\nWiden ra_ofs and usa_ofs as well, as ntfs_check_restart_area() already\ndoes: both are loaded from __le16 on-disk fields and every comparison is\nagainst a non-negative value, so no result changes.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: fix u16 truncation of the update sequence array count check\n\nntfs_check_restart_page_header() bounds the on-disk system page size by\nrecomputing the update sequence array count from it:\n\n\tu16 ra_ofs, usa_count, usa_ofs, usa_end = 0;\n\t...\n\tusa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS);\n\tif (usa_count != le16_to_cpu(rp->usa_count))\n\t\treturn false;\n\nThe right hand side is computed in u32 but stored in a u16, so the count\nwraps once the system page size reaches 0x2000000.  An image claiming any\nlarger power of two passes the check by also claiming usa_count == 1.\n\nNothing else limits the value, so ntfs_check_and_load_restart_page() goes\non to kvzalloc() up to 2 GiB for the restart page and copy that many bytes\na page at a time.  The size is only rejected afterwards, by the\n(size >> NTFS_BLOCK_SIZE_BITS) != usa_count test in post_read_mst_fixup().\n\nCompute the count in a u32 so the existing check rejects an over-large\nsystem page size instead of being defeated by the truncation.  This adds\nno new limit: the array holds one u16 per protected sector plus the update\nsequence number and must end within the first sector, which caps usa_count\nat 240 and the system page size at 64 KiB.\n\nWiden ra_ofs and usa_ofs as well, as ntfs_check_restart_area() already\ndoes: both are loaded from __le16 on-disk fields and every comparison is\nagainst a non-negative value, so no result changes.","source":"cvelist"}],"published":"2026-11-30T13:32:39.766Z","modified":"2026-11-30T14:18:41.800Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1e9ea7e04472d4e5e12e58c881eaacfb3e49b669","fixed":"0e833b45127032953e2ea6b3659e827dc67e064a","status":"affected"},{"type":"git","introduced":"1e9ea7e04472d4e5e12e58c881eaacfb3e49b669","fixed":"b713b69cf79ef52b1737a1a6c09df2522ff875af","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.1","status":"unaffected"},{"type":"semver","introduced":"7.3.6","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/0e833b45127032953e2ea6b3659e827dc67e064a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b713b69cf79ef52b1737a1a6c09df2522ff875af","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139216","url":"https://www.cve.org/CVERecord?id=CVE-2026-139216","licence":"CVE Terms of Use","modified":"2026-11-30T13:32:39.766Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139216","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139216","licence":"Public domain","modified":"2026-11-30T14:18:41.800Z"}],"updatedAt":"2026-11-30T14:32:47.140Z","epss":{"score":0.0019,"percentile":0.09062,"date":"2026-12-01T12:00:22.000Z"}}