CVE-2025-40063
Awaiting Analysis Awaiting Analysis - Queue

BaseFortify

Vulnerability report for CVE-2025-40063, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2025-10-28

Last updated on: 2025-10-30

Assigner: kernel.org

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2025-10-28
Last Modified
2025-10-30
Generated
2026-07-06
AI Q&A
2025-10-28
EPSS Evaluated
2026-07-05
NVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves a mismatch in the definition and layout of context allocation and free operations between two related structures in the Linux kernel's crypto subsystem. Specifically, the crypto_acomp_streams struct relies on having alloc_ctx and free_ctx operations in the same order as the scomp_alg struct. However, due to structure layout randomization, the order of these function pointers in scomp_alg may be randomized, causing a mismatch. This can lead to incorrect behavior or potential security issues. The fix ensures both structures share the same definition and layout for these operations, preventing the mismatch.

Impact Analysis

If the alloc_ctx and free_ctx function pointers are mismatched due to structure layout randomization, it could cause incorrect memory allocation or freeing operations within the crypto subsystem. This may lead to instability, crashes, or potentially exploitable conditions in the Linux kernel's cryptographic operations, affecting system security and reliability.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-40063. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart