diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-11 09:26:47 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-12 09:33:09 +0800 |
commit | 9ae0c92fec69374c6db8dddb0df00d86b9afa5da (patch) | |
tree | 9ed34712affa77bcd15a64562c64697bf608e125 /tools/perf/util/c++/clang-test.cpp | |
parent | b7b39df7e710b0068356e4c696af07aa10e2cd3d (diff) | |
download | linux-stable-9ae0c92fec69374c6db8dddb0df00d86b9afa5da.tar.gz linux-stable-9ae0c92fec69374c6db8dddb0df00d86b9afa5da.tar.bz2 linux-stable-9ae0c92fec69374c6db8dddb0df00d86b9afa5da.zip |
crypto: scomp - Fix wild memory accesses in scomp_free_streams
In order to use scomp_free_streams to free the partially allocted
streams in the allocation error path, move the alg->stream assignment
to the beginning. Also check for error pointers in scomp_free_streams
before freeing the ctx.
Finally set alg->stream to NULL to not break subsequent attempts
to allocate the streams.
Fixes: 3d72ad46a23a ("crypto: acomp - Move stream management into scomp layer")
Reported-by: syzkaller <syzkaller@googlegroups.com>
Co-developed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Co-developed-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/util/c++/clang-test.cpp')
0 files changed, 0 insertions, 0 deletions