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

Published Jul 19, 2026
·
Updated

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

10 affected components
Linux Linux kernel
Linux Linux kernel>=6.1.175<6.2
Linux Linux kernel>=6.6.136<6.6.142
Linux Linux kernel>=6.12.84<6.12.92
Linux Linux kernel>=6.18.25<6.18.34
Linux Linux kernel>=7.0.2<7.0.11
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Linux Linux kernel=7.1-rc3
Linux Linux kernel=7.1-rc4

Event History

Jul 19, 2026
CVE Published
via MITRE·03:40 PM
Data Sourced
via MITRE·03:40 PM
Description
Data Sourced
via NVD·04:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-64139?

The severity of CVE-2026-64139 is rated at a risk level of 52.

2

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.

3

What systems are affected by CVE-2026-64139?

CVE-2026-64139 affects the Linux kernel, particularly systems using ksmbd.

4

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.

5

When was CVE-2026-64139 published?

CVE-2026-64139 was published on July 19, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203