{"id":"CVE-2025-40063","published":"2025-10-28T11:48:34Z","modified":"2026-08-05T12:07:28Z","title":"crypto: comp - Use same definition of context alloc and free ops","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: comp - Use same definition of context alloc and free ops\n\nIn commit 42d9f6c77479 (\"crypto: acomp - Move scomp stream allocation\ncode into acomp\"), the crypto_acomp_streams struct was made to rely on\nhaving the alloc_ctx and free_ctx operations defined in the same order\nas the scomp_alg struct. But in that same commit, the alloc_ctx and\nfree_ctx members of scomp_alg may be randomized by structure layout\nrandomization, since they are contained in a pure ops structure\n(containing only function pointers). If the pointers within scomp_alg\nare randomized, but those in crypto_acomp_streams are not, then\nthe order may no longer match. This fixes the problem by removing the\nunion from scomp_alg so that both crypto_acomp_streams and scomp_alg\nwill share the same definition of alloc_ctx and free_ctx, ensuring\nthey will always have the same layout.","provenance":"source","from":"CVE.org"},"cvss":{"score":7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00133,"percentile":0.02875,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/779d3b6f2d32c5f1da6163e959abe1e1ffe2945b","tags":[]},{"url":"https://git.kernel.org/stable/c/f75f66683ded09f7135aef2e763c245a07c8271a","tags":[]}],"priority":{"score":5.5,"factors":[{"name":"EPSS percentile","points":0.58},{"name":"CVSS severity","points":4.9}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 42d9f6c774790d290c175e8775ce9f1366438098, < 779d3b6f2d32c5f1da6163e959abe1e1ffe2945b",">= 42d9f6c774790d290c175e8775ce9f1366438098, < f75f66683ded09f7135aef2e763c245a07c8271a"]},{"vendor":"Linux","product":"Linux","versions":["6.16"]}],"euvd":{"id":"EUVD-2025-36465","exploited":false,"provenance":"source"}}