]> git.baikalelectronics.ru Git - kernel.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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 2 Nov 2015 09:48:30 +0000 (17:48 +0800)
commit3e4578adc421b03457a3dd9a07682c752834e1cb
treec2304ce35cb7d2bec45f3f257c4194ab2278b3a9
parente0385e09e3b1c6ae89dedecffbd0ed26bba3b1c8
crypto: algif_hash - Only export and import on sockets with data

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.

Cc: stable@vger.kernel.org
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>
crypto/algif_hash.c