CVE-2026-64139 (GCVE-0-2026-64139)
Vulnerability from cvelistv5
Published
2026-07-19 15:40
Modified
2026-08-23 12:45
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow Commit 299f962c0b02 ("ksmbd: use check_add_overflow() to prevent u16 DACL size overflow") added check_add_overflow() guards that break out of the ACE-building loops in set_posix_acl_entries_dacl() when the accumulated DACL size would wrap past 65535. However, each iteration allocates a struct smb_sid via kmalloc_obj() at the top of the loop and relies on the kfree(sid) call at the end of the loop body (the 'pass_same_sid' label in the first loop, and the explicit kfree at the tail of the second loop) to release it. The newly introduced 'break' statements bypass those kfree() calls, leaking the sid buffer every time an overflow is detected. A malicious or malformed file with enough POSIX ACL entries to trip the overflow check will leak one or more struct smb_sid allocations on every request that touches the file's DACL, providing a trivial kernel memory exhaustion vector. Free sid before breaking out of the loops to plug the leak.
Impacted products
Vendor Product Version
Linux Linux Version: 41e53a773db6342ac9a689ee5ba635c31744c9f0
Version: 8d5729350b236896f51379588d9a690b7fafb8db
Version: e1955a94b6f17f4b058afa955a6f187eb3ed7615
Version: 5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43
Version: ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7
Version: 299f962c0b02d048fb45d248b4da493d03f3175d
Create a notification for this product.
   Linux Linux Version: 6.1.175   
Version: 6.6.136   
Version: 6.12.84   
Version: 6.18.25   
Version: 7.0.2   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smbacl.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9b0a8985b419a71ee1cc9c0cc6a9e1bb7815a2c5",
              "status": "affected",
              "version": "41e53a773db6342ac9a689ee5ba635c31744c9f0",
              "versionType": "git"
            },
            {
              "lessThan": "9d378e17c864da08c3a4df41dae92cfa6468b00a",
              "status": "affected",
              "version": "8d5729350b236896f51379588d9a690b7fafb8db",
              "versionType": "git"
            },
            {
              "lessThan": "519fb0a42ce5d7e46935577309fb282a5f2c6ea3",
              "status": "affected",
              "version": "e1955a94b6f17f4b058afa955a6f187eb3ed7615",
              "versionType": "git"
            },
            {
              "lessThan": "0e198f09cb2a554c04de0fea4e790f1250a943ca",
              "status": "affected",
              "version": "5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43",
              "versionType": "git"
            },
            {
              "lessThan": "eced48cb08f07393a5ea770fdd1026452883c3ad",
              "status": "affected",
              "version": "ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7",
              "versionType": "git"
            },
            {
              "lessThan": "af92ee994cc7f7e83a41c2025f32257a2f82a7ef",
              "status": "affected",
              "version": "299f962c0b02d048fb45d248b4da493d03f3175d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/smbacl.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6.1.184",
              "status": "affected",
              "version": "6.1.175",
              "versionType": "semver"
            },
            {
              "lessThan": "6.6.142",
              "status": "affected",
              "version": "6.6.136",
              "versionType": "semver"
            },
            {
              "lessThan": "6.12.92",
              "status": "affected",
              "version": "6.12.84",
              "versionType": "semver"
            },
            {
              "lessThan": "6.18.34",
              "status": "affected",
              "version": "6.18.25",
              "versionType": "semver"
            },
            {
              "lessThan": "7.0.11",
              "status": "affected",
              "version": "7.0.2",
              "versionType": "semver"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.184",
                  "versionStartIncluding": "6.1.175",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.142",
                  "versionStartIncluding": "6.6.136",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.92",
                  "versionStartIncluding": "6.12.84",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.34",
                  "versionStartIncluding": "6.18.25",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0.11",
                  "versionStartIncluding": "7.0.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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 \u0027pass_same_sid\u0027 label in the first loop, and\nthe explicit kfree at the tail of the second loop) to release it.\nThe newly introduced \u0027break\u0027 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\u0027s DACL, providing a trivial\nkernel memory exhaustion vector.\n\nFree sid before breaking out of the loops to plug the leak."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-23T12:45:33.681Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9b0a8985b419a71ee1cc9c0cc6a9e1bb7815a2c5"
        },
        {
          "url": "https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a"
        },
        {
          "url": "https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3"
        },
        {
          "url": "https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca"
        },
        {
          "url": "https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad"
        },
        {
          "url": "https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef"
        }
      ],
      "title": "ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-64139",
    "datePublished": "2026-07-19T15:40:32.459Z",
    "dateReserved": "2026-07-19T07:54:57.037Z",
    "dateUpdated": "2026-08-23T12:45:33.681Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…