diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-07-24 11:09:43 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-08-02 21:11:20 +0800 |
commit | e0d3b845a1b10b7b5abdad7ecc69d45b2aab3209 (patch) | |
tree | 87887a035aa57888e19c240a492ca115927e4e14 /lib/crypto/mpi/mpi-add.c | |
parent | 2fc990581c0988ad35b41a1b4eca840deb3297e2 (diff) | |
download | linux-e0d3b845a1b10b7b5abdad7ecc69d45b2aab3209.tar.gz linux-e0d3b845a1b10b7b5abdad7ecc69d45b2aab3209.tar.bz2 linux-e0d3b845a1b10b7b5abdad7ecc69d45b2aab3209.zip |
crypto: iaa - Fix potential use after free bug
The free_device_compression_mode(iaa_device, device_mode) function frees
"device_mode" but it iss passed to iaa_compression_modes[i]->free() a few
lines later resulting in a use after free.
The good news is that, so far as I can tell, nothing implements the
->free() function and the use after free happens in dead code. But, with
this fix, when something does implement it, we'll be ready. :)
Fixes: b190447e0fa3 ("crypto: iaa - Add compression mode management along with fixed mode")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions