# CVE-2023-53662: ext4: fix memory leaks in ext4_fname_{setup_filename,prepare_lookup}

- 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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-10-07T15:21:21.703Z
- Modified: 2026-10-28T20:10:00.163Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

ext4: fix memory leaks in ext4_fname_{setup_filename,prepare_lookup}

If the filename casefolding fails, we'll be leaking memory from the
fscrypt_name struct, namely from the 'crypto_buf.name' member.

Make sure we free it in the error path on both ext4_fname_setup_filename()
and ext4_fname_prepare_lookup() functions.

(As written by CVE List.)

## Affected

- Linux Linux: from 1ae98e295fa2577fb5e492200c58d10230e00e99 before 98fc9c2cc45cfcb56961a73de3ec69b474063fc0; from 1ae98e295fa2577fb5e492200c58d10230e00e99 before 1fb3f1bbfdb511034b0360dbeb0f6a8424ed2a5c; from 1ae98e295fa2577fb5e492200c58d10230e00e99 before 36daf050be3f6f067631dc52054de2d3b7cc849f; from 1ae98e295fa2577fb5e492200c58d10230e00e99 before 7ca4b085f430f3774c3838b3da569ceccd6a0177; 5.13 (not affected: before 5.13; from 5.15.199 up to 5.15.*; from 6.1.54 up to 6.1.*; from 6.5.4 up to 6.5.*; from 6.6 up to *)
- linux linux_kernel: from 5.13 before 6.1.54; from 6.2 before 6.5.4

## References

- <https://git.kernel.org/stable/c/98fc9c2cc45cfcb56961a73de3ec69b474063fc0>
- <https://git.kernel.org/stable/c/1fb3f1bbfdb511034b0360dbeb0f6a8424ed2a5c> (patch)
- <https://git.kernel.org/stable/c/36daf050be3f6f067631dc52054de2d3b7cc849f> (patch)
- <https://git.kernel.org/stable/c/7ca4b085f430f3774c3838b3da569ceccd6a0177> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2023-53662 · Whole record: https://cve.day/CVE-2023-53662.json · Rebuilt by cve.day 2026-11-25T22:58:34.991Z
