CVE-2026-93811: ksmbd: Fix acl.sd_buf memory leak and invalid sd_size error handling
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Fix acl.sdbuf memory leak and invalid sdsize error handling
1. When ndrdecodev4ntacl() fails, the code jumped to freendata which only freed n.data, skipping kfree(acl.sdbuf) and leaking the buffer. Zero-initialize struct xattrntacl acl, reorder error labels to outfree to release acl.sdbuf on all error paths.
2. if (acl.sdsize < sizeof(struct smbntsd)) is true, original code returned success without freeing sdbuf and left stale pntsd. Set rc = -EINVAL before jumping to outfree to return error code and free buffer.
Affected Software
Event History
Frequently Asked Questions
What are the effects of an NT ACL decode failure in the vulnerable code path?
A failure in ndr_decode_v4_ntacl() can leave acl.sd_buf allocated because the prior error path frees n.data but skips acl.sd_buf. The fix routes this path through cleanup that releases acl.sd_buf.
How does the corrected code handle a security descriptor that is smaller than struct smb_ntsd?
It returns -EINVAL and frees the associated buffer. Previously, this condition could return success, leave the buffer allocated, and retain a stale value in *pntsd.