diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-06-30 06:17:36 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-01 01:21:31 +0200 |
commit | 9901c5d77e969d8215a8e8d087ef02e6feddc84c (patch) | |
tree | 73ee61f04a80beb5ac6002d0c33ab30127ade630 /scripts/gcc-x86_32-has-stack-protector.sh | |
parent | ca09cb04af900768d32c8ba5f807dfc83e9ca4d3 (diff) | |
download | linux-9901c5d77e969d8215a8e8d087ef02e6feddc84c.tar.bz2 |
bpf: sockmap, fix crash when ipv6 sock is added
This fixes a crash where we assign tcp_prot to IPv6 sockets instead
of tcpv6_prot.
Previously we overwrote the sk->prot field with tcp_prot even in the
AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot
are used.
Tested with 'netserver -6' and 'netperf -H [IPv6]' as well as
'netperf -H [IPv4]'. The ESTABLISHED check resolves the previously
crashing case here.
Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
Reported-by: syzbot+5c063698bdbfac19f363@syzkaller.appspotmail.com
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'scripts/gcc-x86_32-has-stack-protector.sh')
0 files changed, 0 insertions, 0 deletions