summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-09-18 09:01:49 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-09-22 02:46:41 +0200
commitb05545e15e1ff1d6a6a8593971275f9cc3e6b92b (patch)
tree15a5f8f63fcea18adbfeeaff94ae6869f3cecc74 /tools/testing
parent5607fff303636d48b88414c6be353d9fed700af2 (diff)
downloadlinux-b05545e15e1ff1d6a6a8593971275f9cc3e6b92b.tar.bz2
bpf: sockmap, fix transition through disconnect without close
It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call our bpf_tcp_close() callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions about sockets always being ESTABLISHED state. To resolve this rely on the unhash hook, which is called in the disconnect case, to remove the sock from the sockmap. Reported-by: Eric Dumazet <edumazet@google.com> Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions