Skip to main content

Linux Kernel CVE-2025-40063

HIGH
2025-10-28 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.0
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.0 HIGH
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
6.5 MEDIUM

Local low-priv attacker (AV:L/PR:L) and RANDSTRUCT-plus-nondeterministic-layout dependency justify AC:H; memory corruption gives I:H/A:H, with confidentiality only partial (C:L).

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat
6.1 MEDIUM
qualitative

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 07:48 vuln.today
CVE Published
Oct 28, 2025 - 12:15 cve.org
HIGH 7.0

DescriptionCVE.org

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.

AnalysisAI

Memory corruption in the Linux kernel's crypto compression subsystem (scomp/acomp) arises because struct layout randomization can reorder the alloc_ctx and free_ctx function pointers in scomp_alg independently of the crypto_acomp_streams struct that was built to mirror them, introduced by commit 42d9f6c77479. When the CONFIG_RANDSTRUCT hardening feature reorders these pure ops structures inconsistently, the kernel invokes the wrong context allocation/free callback, leading to high-impact confidentiality, integrity, and availability effects for a local low-privileged actor. No public exploit identified at time of analysis and EPSS probability is low (0.17%), so this is a hardening-regression fix rather than an actively exploited flaw.

Technical ContextAI

The affected component is the kernel's synchronous/asynchronous compression crypto API, specifically the scomp_alg algorithm descriptor and the crypto_acomp_streams stream-management struct. Commit 42d9f6c77479 moved scomp per-CPU stream allocation into the acomp layer and assumed alloc_ctx/free_ctx appear in the same order in both structs. Because these members live inside a pure ops sub-structure (only function pointers), the CONFIG_RANDSTRUCT / structure layout randomization GCC plugin is free to shuffle them, but crypto_acomp_streams is not randomized identically - producing a pointer/offset mismatch. The root cause is a type-layout assumption violated by compiler-driven randomization (conceptually a CWE-843 type-confusion / incorrect-pointer-dereference class issue); no official CWE was assigned. The fix removes the union from scomp_alg so both structs share one definition and always agree on layout.

Affected ProductsAI

The Linux kernel crypto compression subsystem is affected on builds that include commit 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp") and enable structure layout randomization (CONFIG_RANDSTRUCT). No CPE list or precise version range was provided in the intelligence set; the affected and fixed revisions are identified only by the two kernel.org stable git commits (779d3b6f2d32c5f1da6163e959abe1e1ffe2945b and f75f66683ded09f7135aef2e763c245a07c8271a). Exact tagged stable release numbers should be confirmed against the kernel.org stable trees referenced at https://git.kernel.org/stable/c/779d3b6f2d32c5f1da6163e959abe1e1ffe2945b and https://git.kernel.org/stable/c/f75f66683ded09f7135aef2e763c245a07c8271a.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply the kernel stable commits f75f66683ded09f7135aef2e763c245a07c8271a and 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b (see https://git.kernel.org/stable/c/f75f66683ded09f7135aef2e763c245a07c8271a and https://git.kernel.org/stable/c/779d3b6f2d32c5f1da6163e959abe1e1ffe2945b) by updating to the corresponding patched stable kernel from your distribution once released. As a targeted compensating control, because the defect only manifests when structure layout randomization is active, you can rebuild the kernel with CONFIG_RANDSTRUCT disabled to eliminate the mismatch - the trade-off is loss of that struct-randomization exploit-hardening mitigation, so this should be temporary. Where feasible, also restrict local access to the affected hosts, since exploitation requires an authenticated local presence.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected

Share

CVE-2025-40063 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy