0.0
NA
CVE-2026-64139
ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow
Description

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.

INFO

Published Date :

July 19, 2026, 4:17 p.m.

Last Modified :

July 19, 2026, 4:17 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-64139 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

Solution
Fix memory leak by freeing allocated SIDs before breaking out of loops.
  • Free allocated SIDs before breaking out of loops.
  • Apply kernel patches to address the SID memory leak.
  • Ensure secure handling of POSIX ACL entries.
  • Monitor kernel memory usage for potential exhaustion.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-64139 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-64139 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-64139 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-64139 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jul. 19, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '8d5729350b236896f51379588d9a690b7fafb8db', 'lessThan': '9d378e17c864da08c3a4df41dae92cfa6468b00a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1955a94b6f17f4b058afa955a6f187eb3ed7615', 'lessThan': '519fb0a42ce5d7e46935577309fb282a5f2c6ea3', 'versionType': 'git'}, {'status': 'affected', 'version': '5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43', 'lessThan': '0e198f09cb2a554c04de0fea4e790f1250a943ca', 'versionType': 'git'}, {'status': 'affected', 'version': 'ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7', 'lessThan': 'eced48cb08f07393a5ea770fdd1026452883c3ad', 'versionType': 'git'}, {'status': 'affected', 'version': '299f962c0b02d048fb45d248b4da493d03f3175d', 'lessThan': 'af92ee994cc7f7e83a41c2025f32257a2f82a7ef', 'versionType': 'git'}, {'status': 'affected', 'version': '41e53a773db6342ac9a689ee5ba635c31744c9f0', 'versionType': 'git'}, {'status': 'affected', 'version': '6.1.175', 'lessThan': '6.2', 'versionType': 'semver'}], 'programFiles': ['fs/smb/server/smbacl.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.6.136', 'lessThan': '6.6.142', 'versionType': 'semver'}, {'status': 'affected', 'version': '6.12.84', 'lessThan': '6.12.92', 'versionType': 'semver'}, {'status': 'affected', 'version': '6.18.25', 'lessThan': '6.18.34', 'versionType': 'semver'}, {'status': 'affected', 'version': '7.0.2', 'lessThan': '7.0.11', 'versionType': 'semver'}], 'programFiles': ['fs/smb/server/smbacl.c'], 'defaultStatus': 'unaffected'}]
    Added Description 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.
    Added Reference https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca
    Added Reference https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3
    Added Reference https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a
    Added Reference https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef
    Added Reference https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.