ksmbd: fix sd_ndr.data memory leak in ksmbd_vfs_set_sd_xattr
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.222, 6.1.189, 6.6.158, 6.12.111, 6.18.53
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in 306d6f370da7e0e5532dc51c972f4ce101e42431; From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in dc55270e410ccb4d24e637c13b5c4c25bcd106d7; From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in c866c3314a6853eb06c7a8bef67f43c8a8bdfb6e; From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in 9b4dec75498fd0a1c9eaea680aef59c9519eb16f; From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in c521dd78e036b5e0cfd394dd2ff2218890dd9e41; From 303fff2b8c77a85c62dbde3b27c24b084144c04c · fixed in d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7
- Linux Linux
5.15
- KernelLinux
From 5.15.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.111; From 6.13.0 · fixed in 6.18.53