LiveActive security incident?Get immediate response
CVE Record

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.

HighCVSS 7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

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.
Prepared
Confidence
medium
Sources
4

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.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

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.

ScoreVersionSeverityVectorExploitImpactSource
7CVSS 3.1HighCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H15.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

7High
CVSS 3.1 vector shape for CVE-2025-40063Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux42d9f6c774790d290c175e8775ce9f1366438098, 42d9f6c774790d290c175e8775ce9f1366438098unaffected
LinuxLinux6.16, 0, 6.17.3, 6.18affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.