Vulnerability · Published Oct 28, 2025 · Assigned by Linux

CVE-2025-40063crypto: comp - Use same definition of context alloc and free ops

High 7.0

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 3% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.0High
Exploit odds (30 days)0.1%top 97.4% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:14linux6.17.6-1DEBIAN-CVE-2025-40063
Ubuntu:25.10linux6.17.0-14.14UBUNTU-CVE-2025-40063
Ubuntu:25.10linux6.17.0-14.14USN-8029-1
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-aws6.17.0-1007.7USN-8029-2
Ubuntu:25.10linux-aws6.17.0-1007.7UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-aws-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-azure6.17.0-1008.8USN-8029-3
Ubuntu:25.10linux-azure6.17.0-1008.8UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-gcp6.17.0-1007.7UBUNTU-CVE-2025-40063
Ubuntu:25.10linux-gcp6.17.0-1007.7USN-8030-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-gcp-6.176.17.0-1008.8~24.04.1UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-nvidia-6.176.17.0-1008.8UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-oem-6.176.17.0-1011.11UBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-oem-6.176.17.0-1011.11USN-8048-1
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-oracle6.17.0-1007.7UBUNTU-CVE-2025-40063
Ubuntu:25.10linux-oracle6.17.0-1007.7USN-8029-2
Ubuntu:24.04:LTSlinux-oracle-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-raspi6.17.0-1008.8USN-8029-1
Ubuntu:25.10linux-raspi6.17.0-1008.8UBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-realtime6.17.0-1006.7USN-8029-1
Ubuntu:25.10linux-realtime6.17.0-1006.7UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40063
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40063
Ubuntu:25.10linux-riscv6.17.0-14.14.1UBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-40063
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-40063

Affected products (as reported)

VendorProductVersions
Linux Linux 42d9f6c774790d290c175e8775ce9f1366438098 – before 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b42d9f6c774790d290c175e8775ce9f1366438098 – before f75f66683ded09f7135aef2e763c245a07c8271a
Linux Linux 6.16

References