CVE-2025-40063: crypto: comp - Use same definition of context alloc and free ops
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.
Security readout for executives and security teams
Plain-English summary
A Linux kernel crypto-compression flaw can cause context allocation and cleanup operations to be interpreted incorrectly when structure layout randomization changes function-pointer ordering. Successful exploitation requires local, low-privileged access and high complexity, but the supplied CVSS assessment indicates potentially severe confidentiality, integrity, and availability impact.
Executive priority
Treat as a high-priority kernel maintenance issue, especially for multi-user Linux systems. It is not supported as an internet-remote emergency or known-exploited event. Accelerate vendor confirmation and patching, while allowing risk-based scheduling where local access is tightly restricted.
Technical view
A prior change made crypto_acomp_streams depend on alloc_ctx and free_ctx matching scomp_alg layout. Structure layout randomization could reorder those pointers only in scomp_alg, creating a mismatch. The referenced fix removes the union so both structures share one definition and layout. The supplied score is CVSS 3.1 7.0: local, high-complexity, low-privilege attack.
Likely exposure
Exposure is most plausible on affected Linux kernels where structure layout randomization produces the mismatched ordering and the relevant crypto-compression code is exercised. The supplied version metadata lists 6.16, 6.17.3, and 6.18 but is ambiguous about exact ranges; confirm status with the kernel or distribution vendor.
Exploitation context
The supplied CVSS vector requires local access, low privileges, no user interaction, and high attack complexity. CISA KEV status is false, and the bundle provides no evidence of public or active exploitation. Potential impact is high across confidentiality, integrity, and availability, but practical exploitability is not established here.
Researcher notes
The defect is a function-pointer layout mismatch conditioned on structure layout randomization. The source bundle identifies the corrective design but does not document a triggering sequence, affected configurations, observed crashes, exploit reliability, or precise distribution package boundaries. Avoid inferring exploitation from the CVSS impact ratings alone.
Mitigation direction
Apply a vendor-supported kernel containing the referenced layout-consistency fix.
Check distribution security guidance for exact fixed package versions.
Prioritize shared or multi-user systems where untrusted users have local accounts.
Use normal kernel maintenance controls and reboot into the corrected kernel after updating.
Validation and detection
Record the running kernel version and distribution package release.
Compare that release against current Linux stable or distribution advisories.
Confirm the vendor kernel includes either referenced corrective commit or an equivalent backport.
After remediation, verify the corrected kernel is running, not merely installed.
Review local-account exposure while exploitability remains uncertain.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40063 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.