{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "1e9ea7e04472d4e5e12e58c881eaacfb3e49b669"
            },
            {
              "fixed": "0e833b45127032953e2ea6b3659e827dc67e064a"
            },
            {
              "fixed": "b713b69cf79ef52b1737a1a6c09df2522ff875af"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "7.1.0"
            },
            {
              "fixed": "7.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139216.json"
  },
  "details": "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 \u003e\u003e NTFS_BLOCK_SIZE_BITS);\n\tif (usa_count != le16_to_cpu(rp-\u003eusa_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 \u003e\u003e 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.",
  "id": "CVE-2026-139216",
  "modified": "2026-12-01T20:45:50.400045863Z",
  "published": "2026-11-30T13:32:39.766Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0e833b45127032953e2ea6b3659e827dc67e064a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b713b69cf79ef52b1737a1a6c09df2522ff875af"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139216.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139216"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "ntfs: fix u16 truncation of the update sequence array count check"
}