CVE-2026-64139

Source
https://cve.org/CVERecord?id=CVE-2026-64139
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64139.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-64139
Downstream
Published
2026-07-19T15:40:32Z
Modified
2026-08-25T03:30:32Z
Summary
ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64139.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
41e53a773db6342ac9a689ee5ba635c31744c9f0
Fixed
9b0a8985b419a71ee1cc9c0cc6a9e1bb7815a2c5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8d5729350b236896f51379588d9a690b7fafb8db
Fixed
9d378e17c864da08c3a4df41dae92cfa6468b00a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e1955a94b6f17f4b058afa955a6f187eb3ed7615
Fixed
519fb0a42ce5d7e46935577309fb282a5f2c6ea3
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43
Fixed
0e198f09cb2a554c04de0fea4e790f1250a943ca
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7
Fixed
eced48cb08f07393a5ea770fdd1026452883c3ad
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
299f962c0b02d048fb45d248b4da493d03f3175d
Fixed
af92ee994cc7f7e83a41c2025f32257a2f82a7ef

Affected versions

v6.*
v6.1.175
v6.1.176
v6.1.177
v6.1.178
v6.1.179
v6.1.180
v6.1.181
v6.1.182
v6.1.183
v6.12.84
v6.12.85
v6.12.86
v6.12.87
v6.12.88
v6.12.89
v6.12.90
v6.12.91
v6.18.25
v6.18.26
v6.18.27
v6.18.28
v6.18.29
v6.18.30
v6.18.31
v6.18.32
v6.18.33
v6.6.136
v6.6.137
v6.6.138
v6.6.139
v6.6.140
v6.6.141
v7.*
v7.0.10
v7.0.2
v7.0.3
v7.0.4
v7.0.5
v7.0.6
v7.0.7
v7.0.8
v7.0.9

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64139.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.1.175
Fixed
6.1.184
Type
ECOSYSTEM
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

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64139.json"