Skip to main content
EPSS 0.1%top 98%

Linux hwe edge: In the Linux kernel, the following vulnerability has been resolved: crypto: comp - Use same definition of context alloc and free ops In commit… (CVE-2025-40063)

0
Medium
Published: 10/28/2025 (10/28/2025, 12:15:00 UTC)
Source: GCVE Database
Product: linux-hwe-edge

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.

CVSS v3.1

Score 7.0high

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Affected versions
<6.17.0-1007.7~24.04.1<6.17.0-1008.8~24.04.1<6.17.0-1008.8<6.17.0-1011.11

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 16:22:56 UTC

Technical Analysis

The vulnerability (CVE-2025-40063) in the Linux kernel's crypto component related to compression (comp) was due to inconsistent definitions of alloc_ctx and free_ctx operations between the scomp_alg struct and the crypto_acomp_streams struct. A commit introduced structure layout randomization for scomp_alg, which could cause the order of function pointers to differ from that in crypto_acomp_streams, leading to potential misuse of these pointers. The resolution removed the union from scomp_alg so both structures share the same layout, ensuring alloc_ctx and free_ctx are consistently defined and ordered.

Potential Impact

If exploited, this vulnerability could lead to high impact on confidentiality, integrity, and availability of the system, as indicated by the CVSS vector (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H). The misalignment of function pointers could cause incorrect cryptographic operations or memory corruption within the kernel's crypto compression functionality.

Mitigation Recommendations

A fix has been applied in the Linux kernel source code that removes the union from the scomp_alg structure to ensure consistent layout with crypto_acomp_streams. Users should update their Linux kernel to a version that includes this fix. No additional mitigations are specified.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-94hr-47ff-rmcx
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40063"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d79c2644c7f847b1dc

Added to database: 07/30/2026, 15:50:47 UTC

Last enriched: 07/30/2026, 16:22:56 UTC

Last updated: 09/10/2026, 19:36:50 UTC

Views: 21

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses