crypto: algif_hash - Fix race condition in hash_check_key
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 27 Oct 2016 14:29:46 +0000 (17:29 +0300)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Feb 2017 08:04:07 +0000 (09:04 +0100)
commit54541dc3cef16ceca14c490a84d66073f1c2aa61
tree4f05f8b5ae8368479ac97eaf1eb33cbf5d8d2542
parentfb0b50cf872a56be4e216d0ec8a1ff506ff879d9
crypto: algif_hash - Fix race condition in hash_check_key

commit ad46d7e33219218605ea619e32553daf4f346b9f upstream.

We need to lock the child socket in hash_check_key as otherwise
two simultaneous calls can cause the parent socket to be freed.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
crypto/algif_hash.c