diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-12-30 11:47:53 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-02-03 16:23:18 -0500 |
commit | 0571ba52a19e18a1c20469454231eef681cb1310 (patch) | |
tree | 73e9241c6d91b22bc5d0e796b7c4a647aa9834fa /arch/ia64 | |
parent | bc24ac15b0746172a8f603171352aa54abcf7c78 (diff) | |
download | linux-exynos-0571ba52a19e18a1c20469454231eef681cb1310.tar.gz linux-exynos-0571ba52a19e18a1c20469454231eef681cb1310.tar.bz2 linux-exynos-0571ba52a19e18a1c20469454231eef681cb1310.zip |
crypto: af_alg - Disallow bind/setkey/... after accept(2)
[ Upstream commit c840ac6af3f8713a71b4d2363419145760bd6044 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/ia64')
0 files changed, 0 insertions, 0 deletions