]> 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:28:22 +0000 (14:28 -0800)
commitd4f9756c6ad78cbb728549e1e0dd7afafd8069a6
treea3fc5e867a629cbc8f9b7032ca6603b7053951f7
parenta349da65d72708d63cd8a0c1303549ac98c3a957
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