]> git.ipfire.org Git - thirdparty/linux.git/commit
crypto: acomp - Fix CFI failure due to type punning
authorEric Biggers <ebiggers@kernel.org>
Wed, 9 Jul 2025 00:59:54 +0000 (17:59 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Jul 2025 10:52:00 +0000 (20:52 +1000)
commit962ddc5a7a4b04c007bba0f3e7298cda13c62efd
tree541459cb226120bc1f3c7e18ef7ee82da63eebbf
parent3d9eb180fbe8828cce43bce4c370124685b205c3
crypto: acomp - Fix CFI failure due to type punning

To avoid a crash when control flow integrity is enabled, make the
workspace ("stream") free function use a consistent type, and call it
through a function pointer that has that same type.

Fixes: 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/deflate.c
crypto/zstd.c
include/crypto/internal/acompress.h