Skip to contentSkip to conversation

CVE-2026-93812: ksmbd: fix sd_ndr.data memory leak in ksmbd_vfs_set_sd_xattr

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 sd_ndr.data memory leak in ksmbd_vfs_set_sd_xattr

ndr_encode_v4_ntacl() allocates sd_ndr.data via kzalloc() at entry. If any subsequent ndr_write_*() call returns error during encoding, the allocated sd_ndr.data won't be freed and causes memory leak.

Move kfree(sd_ndr.data) into out label to ensure the buffer gets released on all success and error return paths.

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

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

	Fixed in 6.12.111 with commit 9b4dec75498fd0a1c9eaea680aef59c9519eb16f
	Fixed in 6.18.53 with commit c521dd78e036b5e0cfd394dd2ff2218890dd9e41
	Fixed in 7.2 with commit d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7

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-93812

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/9b4dec75498fd0a1c9eaea680aef59c9519eb16f
	https://git.kernel.org/stable/c/c521dd78e036b5e0cfd394dd2ff2218890dd9e41
	https://git.kernel.org/stable/c/d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7