CVE-2025-71113: crypto: af_alg - zero initialize memory allocated via sock_kmalloc
In the Linux kernel, the following vulnerability has been resolved:
crypto: afalg - zero initialize memory allocated via sockkmalloc
Several crypto user API contexts and requests allocated with sockkmalloc() were left uninitialized, relying on callers to set fields explicitly. This resulted in the use of uninitialized data in certain error paths or when new fields are added in the future.
The ACVP patches also contain two user-space interface files: algifkpp.c and algifakcipher.c. These too rely on proper initialization of their context structures.
A particular issue has been observed with the newly added 'inflight' variable introduced in afalgctx by commit:
67b164a871af ("crypto: afalg - Disallow multiple in-flight AIO requests")
Because the context is not memset to zero after allocation, the inflight variable has contained garbage values. As a result, afalgallocareq() has incorrectly returned -EBUSY randomly when the garbage value was interpreted as true:
https://github.com/gregkh/linux/blame/master/crypto/afalg.c#L1209
The check directly tests ctx->inflight without explicitly comparing against true/false. Since inflight is only ever set to true or false later, an uninitialized value has triggered -EBUSY failures. Zero-initializing memory allocated with sockkmalloc() ensures inflight and other fields start in a known state, removing random issues caused by uninitialized data.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel crypto: af_algto a version that resolves this vulnerability.Patch 67b164a871af - Upgrade
Upgrade
Linux kernel crypto: af_alg alloc areq initializationto a version that resolves this vulnerability.Patch crypto: af_alg - zero initialize memory allocated via sock_kmalloc
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71113?
CVE-2025-71113 has been rated as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-71113?
To fix CVE-2025-71113, update your Linux kernel to the latest stable version that includes the patch.
What systems are affected by CVE-2025-71113?
CVE-2025-71113 affects various versions of the Linux kernel utilizing the crypto af_alg API.
What are the potential impacts of CVE-2025-71113?
CVE-2025-71113 could lead to information leakage by exposing uninitialized memory.
Is CVE-2025-71113 actively being exploited?
As of now, there are no known exploits for CVE-2025-71113 in the wild.