CVE-2025-40063
crypto: comp - Use same definition of context alloc and free ops
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 42d9f6c774790d290c175e8775ce9f1366438098, < 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b; >= 42d9f6c774790d290c175e8775ce9f1366438098, < f75f66683ded09f7135aef2e763c245a07c8271a
- Anyone running Linux 6.16
Vulnerability facts
- Affected
- Linux >= 42d9f6c774790d290c175e8775ce9f1366438098, < 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b; >= 42d9f6c774790d290c175e8775ce9f1366438098, < f75f66683ded09f7135aef2e763c245a07c8271a; Linux 6.16
- Fixed in
- Linux 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.0 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.19% chance of exploitation in 30 days (percentile 5, 2026-11-26)
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-40063. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40063.md Affected: Linux >= 42d9f6c774790d290c175e8775ce9f1366438098, < 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b; >= 42d9f6c774790d290c175e8775ce9f1366438098, < f75f66683ded09f7135aef2e763c245a07c8271a; Linux 6.16 Fixed in: Linux 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2025-40063 being exploited?
There is no confirmed exploitation: CVE-2025-40063 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-40063?
High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-40063?
Linux >= 42d9f6c774790d290c175e8775ce9f1366438098, < 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b; >= 42d9f6c774790d290c175e8775ce9f1366438098, < f75f66683ded09f7135aef2e763c245a07c8271a; Linux 6.16.
Is there a fix for CVE-2025-40063?
Yes. Fixed in Linux 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-40063?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.