summaryrefslogtreecommitdiff
path: root/crypto/842.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-12-30 11:47:53 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-01-18 18:16:09 +0800
commit796caacfda1cea522bd0b442b37a6a9286500487 (patch)
treeed3917c2cb997e4baba6b9f2b4bfbc8c5495f8a6 /crypto/842.c
parent232771d84c93fa781e244dc778e1bb2e81ea642a (diff)
downloadlinux-crypto-796caacfda1cea522bd0b442b37a6a9286500487.tar.gz
linux-crypto-796caacfda1cea522bd0b442b37a6a9286500487.zip
crypto: af_alg - Disallow bind/setkey/... after accept(2)
Each af_alg parent socket obtained by socket(2) corresponds to a tfm object once bind(2) has succeeded. An accept(2) call on that parent socket creates a context which then uses the tfm object. Therefore as long as any child sockets created by accept(2) exist the parent socket must not be modified or freed. This patch guarantees this by using locks and a reference count on the parent socket. Any attempt to modify the parent socket will fail with EBUSY. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/842.c')
0 files changed, 0 insertions, 0 deletions