{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2"
            },
            {
              "fixed": "11f4d8d581f3d367b5f39b2d35958cb915900545"
            },
            {
              "fixed": "40d51dc46f3ee4bf7548d0ebf4b472bd0ef68304"
            },
            {
              "fixed": "edf6ef8abff1029329db93b950dadd4c04312afb"
            },
            {
              "fixed": "1c433ec192931612f3dd776184f123d3174b6de8"
            },
            {
              "fixed": "de769c810575592bbe0926150bdf34517e7b84c4"
            },
            {
              "fixed": "dc4724be77c93c2d067aad80525437979c662832"
            },
            {
              "fixed": "9a79e3a2753fa5988af94c641d5ab06d21c8f262"
            },
            {
              "fixed": "78ea2058abf3ee053c0bd9c1b9a77304cb4ae58b"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.12"
            },
            {
              "fixed": "5.10.275"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.193"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.63"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139017.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\naffs: validate blocks before freeing them\n\naffs_free_block() accepts block numbers from on-disk file block tables\nwhen truncating or unlinking files. The function currently rejects only\nblock numbers greater than s_partition_size before subtracting\ns_reserved and using the result to index the in-memory bitmap descriptor\narray.\n\nThat check still accepts reserved blocks and the one-past-end block at\ns_partition_size. A crafted image can therefore make the subtraction\nunderflow or make the computed bitmap index equal to s_bmap_count,\nleading to an out-of-bounds access on s_bitmap before the bitmap block is\nread and updated.\n\nUse the existing AFFS block validity helper so freeing uses the same\nrange as block reads and writes: s_reserved \u003c= block \u003c s_partition_size.",
  "id": "CVE-2026-139017",
  "modified": "2026-11-30T14:46:03.952049325Z",
  "published": "2026-11-30T13:27:06.177Z",
  "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/11f4d8d581f3d367b5f39b2d35958cb915900545"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1c433ec192931612f3dd776184f123d3174b6de8"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/40d51dc46f3ee4bf7548d0ebf4b472bd0ef68304"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/78ea2058abf3ee053c0bd9c1b9a77304cb4ae58b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9a79e3a2753fa5988af94c641d5ab06d21c8f262"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/dc4724be77c93c2d067aad80525437979c662832"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/de769c810575592bbe0926150bdf34517e7b84c4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/edf6ef8abff1029329db93b950dadd4c04312afb"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139017.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139017"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "affs: validate blocks before freeing them"
}