SUNRPC: fix a memleak in gss_import_v2_context
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s SUNRPC gss_import_v2_context can leak memory allocated for ctx->mech_used.data when context import fails. The input does not establish whether an attacker can trigger the leak or specify access, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.