]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: algif_hash - Only export and import on sockets with data
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Nov 2015 09:11:19 +0000 (17:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:22:37 +0000 (14:22 -0800)
commitdaaf3fd914414d67fd656a39c0f1575c07f02985
tree2ae7789cf0fe18e72ea4dbe9f40b9ddf42e12e26
parent12c1515f4aae559359aec9d9381c2657fb19498a
crypto: algif_hash - Only export and import on sockets with data

commit 4afa5f9617927453ac04b24b584f6c718dfb4f45 upstream.

The hash_accept call fails to work on sockets that have not received
any data.  For some algorithm implementations it may cause crashes.

This patch fixes this by ensuring that we only export and import on
sockets that have received data.

Reported-by: Harsh Jain <harshjain.prof@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/algif_hash.c