diff options
author | Eric Biggers <ebiggers@google.com> | 2017-11-28 11:46:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 12:10:17 +0300 |
commit | cf1048e46d4f301261d946e73add464fb95fd5a4 (patch) | |
tree | 9c89ece2901d0c4948298e5690673b20eb9d26be /COPYING | |
parent | c68b31521d5fb7216cb1113130399afe65437c6c (diff) | |
download | linux-cf1048e46d4f301261d946e73add464fb95fd5a4.tar.xz |
crypto: af_alg - fix NULL pointer dereference in
commit 887207ed9e5812ed9239b6d07185a2d35dda91db upstream.
af_alg_free_areq_sgls()
If allocating the ->tsgl member of 'struct af_alg_async_req' failed,
during cleanup we dereferenced the NULL ->tsgl pointer in
af_alg_free_areq_sgls(), because ->tsgl_entries was nonzero.
Fix it by only freeing the ->tsgl list if it is non-NULL.
This affected both algif_skcipher and algif_aead.
Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management")
Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions