CVE-2025-40063 in Crypto products
In the Linux kernel, the following vulnerability has been resolved: crypto: comp - Use same definition of context alloc and free ops In commit 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp"), the crypto_acomp_streams struct was made to rely on having the alloc_ctx and free_ctx operati...
Affects 1 product from 3 vendors. Facts below cite their sources.
Requires local access, high complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
In the Linux kernel, the following vulnerability has been resolved: crypto: comp - Use same definition of context alloc and free ops In commit 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp"), the crypto_acomp_streams struct was made to rely on having the alloc_ctx and free_ctx operations defined in the same order as the scomp_alg struct. But in that same commit, the alloc_ctx and free_ctx members of scomp_alg may be randomized by structure layout randomization, since they are contained in a pure ops structure (containing only function pointers). If the pointers within scomp_alg are randomized, but those in crypto_acomp_streams are not, then the order may no longer match. This fixes the problem by removing the union from scomp_alg so that both crypto_acomp_streams and scomp_alg will share the same definition of alloc_ctx and free_ctx, ensuring they will always have the same layout.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2025-40063 |
|---|---|
| BreachSpider ID | BS-2025-GLOBAL-258765-I |
| CVSS vector | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2025-10-28 |
| Last modified | 2026-10-19 |
| Source | NVD |
Analysis AI-written, not human-reviewed
A vulnerability in the Linux kernel's crypto compression module (crypto: comp) could lead to inconsistent context allocation and deallocation due to mismatched definitions of alloc_ctx and free_ctx operations.
The vulnerability arises from the crypto_acomp_streams struct relying on the alloc_ctx and free_ctx operations being defined in the same order as the scomp_alg struct, which was not ensured in the commit 42d9f6c77479. This could potentially lead to memory corruption or other security issues if an attacker can exploit the inconsistent context management.
Questions
What is CVE-2025-40063?
A vulnerability in the Linux kernel's crypto compression module (crypto: comp) could lead to inconsistent context allocation and deallocation due to mismatched definitions of alloc_ctx and free_ctx operations.
What is the CVSS score for CVE-2025-40063?
CVE-2025-40063 has CVSS 7.0 (High). Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.2%.
Is CVE-2025-40063 actively exploited?
No confirmed active exploitation of CVE-2025-40063 as of 2026-10-25.
How do I remediate CVE-2025-40063?
Priority: MEDIUM.
What systems are affected by CVE-2025-40063?
CVE-2025-40063 affects Crypto; Kernel; Linux Linux.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Crypto","product":"EDS-518A","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-19.