crypto: algif_hash - Only export and import on sockets with data
Orabug:
25097996
CVE: CVE-2016-8646
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>
(cherry picked from commit
4afa5f9617927453ac04b24b584f6c718dfb4f45)
Signed-off-by: Aniket Alshi <aniket.alshi@oracle.com>