{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "8d5729350b236896f51379588d9a690b7fafb8db"
            },
            {
              "fixed": "9d378e17c864da08c3a4df41dae92cfa6468b00a"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "e1955a94b6f17f4b058afa955a6f187eb3ed7615"
            },
            {
              "fixed": "519fb0a42ce5d7e46935577309fb282a5f2c6ea3"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43"
            },
            {
              "fixed": "0e198f09cb2a554c04de0fea4e790f1250a943ca"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7"
            },
            {
              "fixed": "eced48cb08f07393a5ea770fdd1026452883c3ad"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "299f962c0b02d048fb45d248b4da493d03f3175d"
            },
            {
              "fixed": "af92ee994cc7f7e83a41c2025f32257a2f82a7ef"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "41e53a773db6342ac9a689ee5ba635c31744c9f0"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "6.1.175"
            },
            {
              "fixed": "6.2"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.6.136"
            },
            {
              "fixed": "6.6.142"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.12.84"
            },
            {
              "fixed": "6.12.92"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.18.25"
            },
            {
              "fixed": "6.18.34"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "7.0.2"
            },
            {
              "fixed": "7.0.11"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64139.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow\n\nCommit 299f962c0b02 (\"ksmbd: use check_add_overflow() to prevent u16\nDACL size overflow\") added check_add_overflow() guards that break out\nof the ACE-building loops in set_posix_acl_entries_dacl() when the\naccumulated DACL size would wrap past 65535.\n\nHowever, each iteration allocates a struct smb_sid via kmalloc_obj()\nat the top of the loop and relies on the kfree(sid) call at the end\nof the loop body (the 'pass_same_sid' label in the first loop, and\nthe explicit kfree at the tail of the second loop) to release it.\nThe newly introduced 'break' statements bypass those kfree() calls,\nleaking the sid buffer every time an overflow is detected.\n\nA malicious or malformed file with enough POSIX ACL entries to trip\nthe overflow check will leak one or more struct smb_sid allocations\non every request that touches the file's DACL, providing a trivial\nkernel memory exhaustion vector.\n\nFree sid before breaking out of the loops to plug the leak.",
  "id": "CVE-2026-64139",
  "modified": "2026-07-21T03:42:12.141180829Z",
  "published": "2026-07-19T15:40:32.459Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64139.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-64139"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.8.0",
  "summary": "ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow"
}