# CVE-2025-71153: ksmbd: Fix memory leak in get_file_all_info()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- 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.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-01-23T14:25:52.988Z
- Modified: 2026-06-17T10:03:46.223Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

ksmbd: Fix memory leak in get_file_all_info()

In get_file_all_info(), if vfs_getattr() fails, the function returns
immediately without freeing the allocated filename, leading to a memory
leak.

Fix this by freeing the filename before returning in this error case.

(As written by CVE List.)

## Affected

- Linux Linux: from c8f7ad2df083c510e640c0bf76166593cc116ff2 before 5012b4c812230ae066902a00442708c999111183; from 5614c8c487f6af627614dd2efca038e4afe0c6d7 before 676907004256e0226c7ed3691db9f431404ca258; from 5614c8c487f6af627614dd2efca038e4afe0c6d7 before d026f47db68638521df8543535ef863814fb01b1; from 5614c8c487f6af627614dd2efca038e4afe0c6d7 before 0c56693b06a68476ba113db6347e7897475f9e4c; f9278ba4967027ad2bf001694f0e489c7bbae6d5; 88779f09295d82b86601fe42595748488bf5e20c; from 6.6.24 before 6.6.120; from 6.7.12 before 6.8; from 6.8.3 before 6.9; 6.9 (not affected: before 6.9; from 6.6.120 up to 6.6.*; from 6.12.64 up to 6.12.*; from 6.18.4 up to 6.18.*; from 6.19 up to *)
- linux linux_kernel: from 6.6.24 before 6.6.120; from 6.7.12 before 6.8; from 6.8.3 before 6.12.64; from 6.13 before 6.18.4; 6.19

## References

- <https://git.kernel.org/stable/c/5012b4c812230ae066902a00442708c999111183> (patch)
- <https://git.kernel.org/stable/c/676907004256e0226c7ed3691db9f431404ca258> (patch)
- <https://git.kernel.org/stable/c/d026f47db68638521df8543535ef863814fb01b1> (patch)
- <https://git.kernel.org/stable/c/0c56693b06a68476ba113db6347e7897475f9e4c> (patch)

## Sources

- CVE List: [CVE-2025-71153](https://www.cve.org/CVERecord?id=CVE-2025-71153), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2025-71153](https://nvd.nist.gov/vuln/detail/CVE-2025-71153), Public domain, modified 2026-06-17

---

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