CVE-2026-64139: ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix SID memory leak in setposixaclentriesdacl() on overflow
Commit 299f962c0b02 ("ksmbd: use checkaddoverflow() to prevent u16 DACL size overflow") added checkaddoverflow() guards that break out of the ACE-building loops in setposixaclentriesdacl() when the accumulated DACL size would wrap past 65535.
However, each iteration allocates a struct smbsid via kmallocobj() at the top of the loop and relies on the kfree(sid) call at the end of the loop body (the 'passsamesid' 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 smbsid 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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-64139?
The severity of CVE-2026-64139 is rated at a risk level of 52.
How do I fix CVE-2026-64139?
To fix CVE-2026-64139, update your Linux kernel to a version that includes the patch from commit 299f962c0b02.
What systems are affected by CVE-2026-64139?
CVE-2026-64139 affects the Linux kernel, particularly systems using ksmbd.
What vulnerability does CVE-2026-64139 address?
CVE-2026-64139 addresses a SID memory leak in the set_posix_acl_entries_dacl() function on overflow.
When was CVE-2026-64139 published?
CVE-2026-64139 was published on July 19, 2026.