Skip to contentSkip to conversation

CVE-2026-93811: ksmbd: Fix acl.sd_buf memory leak and invalid sd_size error handling

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 24

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: Fix acl.sd_buf memory leak and invalid sd_size error handling

1. When ndr_decode_v4_ntacl() fails, the code jumped to free_n_data which only freed n.data, skipping kfree(acl.sd_buf) and leaking the buffer. Zero-initialize struct xattr_ntacl acl, reorder error labels to out_free to release acl.sd_buf on all error paths.

2. if (acl.sd_size < sizeof(struct smb_ntsd)) is true, original code returned success without freeing sd_buf and left stale *pntsd. Set rc = -EINVAL before jumping to out_free to return error code and free buffer.

The Linux kernel CVE team has assigned CVE-2026-93811 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.12.111 with commit c3836f55e0dab96314774215e12d87f63fa919f2
	Fixed in 6.18.53 with commit 6e6329322ad733c5b23555c609353841560b26bc
	Fixed in 7.2 with commit d708a36634bb7b6f94d0e76d587d2ec50b2b93b5

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-93811

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/smb/server/vfs.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c3836f55e0dab96314774215e12d87f63fa919f2
	https://git.kernel.org/stable/c/6e6329322ad733c5b23555c609353841560b26bc
	https://git.kernel.org/stable/c/d708a36634bb7b6f94d0e76d587d2ec50b2b93b5