summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-06-17 10:10:27 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-19 21:13:43 +0200
commit86fdb3448cc1ffe0e9f55380f1410f1d12c35f95 (patch)
treeb6fefe0b3cf22d208e9afa87f9dd638116ac6606 /fs
parentnet/hns:bugfix of ethtool -t phy self_test (diff)
downloadlinux-86fdb3448cc1ffe0e9f55380f1410f1d12c35f95.tar.xz
linux-86fdb3448cc1ffe0e9f55380f1410f1d12c35f95.zip
sctp: ensure ep is not destroyed before doing the dump
Now before dumping a sock in sctp_diag, it only holds the sock while the ep may be already destroyed. It can cause a use-after-free panic when accessing ep->asocs. This patch is to set sctp_sk(sk)->ep NULL in sctp_endpoint_destroy, and check if this ep is already destroyed before dumping this ep. Suggested-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdrver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions