Home
last modified time | relevance | path

Searched hist:c840ac6af3f8713a71b4d2363419145760bd6044 (Results 1 – 2 of 2) sorted by relevance

/linux/include/crypto/
H A Dif_alg.hdiff c840ac6af3f8713a71b4d2363419145760bd6044 Wed Dec 30 04:47:53 CET 2015 Herbert Xu <herbert@gondor.apana.org.au> 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>
/linux/crypto/
H A Daf_alg.cdiff c840ac6af3f8713a71b4d2363419145760bd6044 Wed Dec 30 04:47:53 CET 2015 Herbert Xu <herbert@gondor.apana.org.au> 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>