# CVE-2023-52653: SUNRPC: fix a memleak in gss_import_v2_context

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `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.30%, higher than 16% of CVEs (2026-11-30)
- Published: 2024-05-01T13:04:02.055Z
- Modified: 2026-10-30T13:17:15.997Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

SUNRPC: fix a memleak in gss_import_v2_context

The ctx->mech_used.data allocated by kmemdup is not freed in neither
gss_import_v2_context nor it only caller gss_krb5_import_sec_context,
which frees ctx on error.

Thus, this patch reform the last call of gss_import_v2_context to the
gss_krb5_import_ctx_v2, preventing the memleak while keepping the return
formation.

(As written by CVE List.)

## Affected

- Linux Linux: from 47d84807762966c3611c38adecec6ea703ddda7a before 32a15b6a9a0ac326ca65ce988a1ba046517af3d5; from 47d84807762966c3611c38adecec6ea703ddda7a before 99044c01ed5329e73651c054d8a4baacdbb1a27c; from 47d84807762966c3611c38adecec6ea703ddda7a before 47ac11db93e74ac49cd6c3fc69bcbc5964c4a8b4; from 47d84807762966c3611c38adecec6ea703ddda7a before d111e30d9cd846bb368faf3637dc0f71fcbcf822; from 47d84807762966c3611c38adecec6ea703ddda7a before e67b652d8e8591d3b1e569dbcdfcee15993e91fa; 2.6.35 (not affected: before 2.6.35; from 6.1.191 up to 6.1.*; from 6.6.23 up to 6.6.*; from 6.7.11 up to 6.7.*; from 6.8.2 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 2.6.35 before 6.6.23; from 6.7 before 6.7.11; from 6.8 before 6.8.2

## References

- <https://git.kernel.org/stable/c/32a15b6a9a0ac326ca65ce988a1ba046517af3d5>
- <https://git.kernel.org/stable/c/99044c01ed5329e73651c054d8a4baacdbb1a27c> (patch)
- <https://git.kernel.org/stable/c/47ac11db93e74ac49cd6c3fc69bcbc5964c4a8b4> (patch)
- <https://git.kernel.org/stable/c/d111e30d9cd846bb368faf3637dc0f71fcbcf822> (patch)
- <https://git.kernel.org/stable/c/e67b652d8e8591d3b1e569dbcdfcee15993e91fa> (patch)

## Sources

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

---

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