{"id":"CVE-2025-40063","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2025-10-28T12:15:40.730","lastModified":"2026-10-19T21:10:00.160","vulnStatus":"Deferred","cveTags":[],"descriptions":[{"lang":"en","value":"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."},{"lang":"es","value":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncrypto: comp - Usar la misma definición de operaciones de asignación y liberación de contexto\n\nEn el commit 42d9f6c77479 ('crypto: acomp - Mover el código de asignación de flujo scomp a acomp'), se hizo que la estructura crypto_acomp_streams dependiera de tener las operaciones alloc_ctx y free_ctx definidas en el mismo orden que la estructura scomp_alg. Pero en ese mismo commit, los miembros alloc_ctx y free_ctx de scomp_alg pueden ser aleatorizados por la aleatorización del diseño de la estructura, ya que están contenidos en una estructura de operaciones pura (que contiene solo punteros a funciones). Si los punteros dentro de scomp_alg son aleatorizados, pero los de crypto_acomp_streams no lo son, entonces el orden puede dejar de coincidir. Esto soluciona el problema al eliminar la unión de scomp_alg para que tanto crypto_acomp_streams como scomp_alg compartan la misma definición de alloc_ctx y free_ctx, asegurando que siempre tendrán el mismo diseño."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["crypto/842.c","crypto/lz4.c","crypto/lz4hc.c","crypto/lzo-rle.c","crypto/lzo.c","drivers/crypto/nx/nx-common-powernv.c","drivers/crypto/nx/nx-common-pseries.c","include/crypto/internal/scompress.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"42d9f6c774790d290c175e8775ce9f1366438098","lessThan":"779d3b6f2d32c5f1da6163e959abe1e1ffe2945b","versionType":"git","status":"affected"},{"version":"42d9f6c774790d290c175e8775ce9f1366438098","lessThan":"f75f66683ded09f7135aef2e763c245a07c8271a","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["crypto/842.c","crypto/lz4.c","crypto/lz4hc.c","crypto/lzo-rle.c","crypto/lzo.c","drivers/crypto/nx/nx-common-powernv.c","drivers/crypto/nx/nx-common-pseries.c","include/crypto/internal/scompress.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.16","status":"affected"},{"version":"0","lessThan":"6.16","versionType":"semver","status":"unaffected"},{"version":"6.17.3","lessThanOrEqual":"6.17.*","versionType":"semver","status":"unaffected"},{"version":"6.18","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.0,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.0,"impactScore":5.9}]},"references":[{"url":"https://git.kernel.org/stable/c/779d3b6f2d32c5f1da6163e959abe1e1ffe2945b","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/f75f66683ded09f7135aef2e763c245a07c8271a","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}