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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-09-24T16:02:49.060Z
- Modified: 2026-10-03T11:17:50.993Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 303fff2b8c77a85c62dbde3b27c24b084144c04c before 306d6f370da7e0e5532dc51c972f4ce101e42431; from 303fff2b8c77a85c62dbde3b27c24b084144c04c before dc55270e410ccb4d24e637c13b5c4c25bcd106d7; from 303fff2b8c77a85c62dbde3b27c24b084144c04c before c866c3314a6853eb06c7a8bef67f43c8a8bdfb6e; from 303fff2b8c77a85c62dbde3b27c24b084144c04c before 9b4dec75498fd0a1c9eaea680aef59c9519eb16f; from 303fff2b8c77a85c62dbde3b27c24b084144c04c before c521dd78e036b5e0cfd394dd2ff2218890dd9e41; from 303fff2b8c77a85c62dbde3b27c24b084144c04c before d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7; 5.15 (not affected: before 5.15; from 5.15.222 up to 5.15.*; from 6.1.189 up to 6.1.*; from 6.6.158 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.53 up to 6.18.*; from 7.2 up to *)

## References

- <https://git.kernel.org/stable/c/306d6f370da7e0e5532dc51c972f4ce101e42431>
- <https://git.kernel.org/stable/c/dc55270e410ccb4d24e637c13b5c4c25bcd106d7>
- <https://git.kernel.org/stable/c/c866c3314a6853eb06c7a8bef67f43c8a8bdfb6e>
- <https://git.kernel.org/stable/c/9b4dec75498fd0a1c9eaea680aef59c9519eb16f>
- <https://git.kernel.org/stable/c/c521dd78e036b5e0cfd394dd2ff2218890dd9e41>
- <https://git.kernel.org/stable/c/d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7>

## Sources

- CVE List: [CVE-2026-93812](https://www.cve.org/CVERecord?id=CVE-2026-93812), CVE Terms of Use, modified 2026-10-03
- NVD: [CVE-2026-93812](https://nvd.nist.gov/vuln/detail/CVE-2026-93812), Public domain, modified 2026-10-03

---

Page: https://cve.day/CVE-2026-93812 · Whole record: https://cve.day/CVE-2026-93812.json · Rebuilt by cve.day 2026-11-25T22:59:40.834Z
