Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-06-01 Thread John Fastabend
On 06/01/2018 12:56 AM, John Fastabend wrote: > On 05/31/2018 06:00 PM, Eric Dumazet wrote: >> On Thu, May 31, 2018 at 7:32 PM John Fastabend >> wrote: >>> >>> >>> Hi Wei, >>> >>> Thanks for the report and fix. It would be better to fix the >>> root cause so that IPv6 works as intended. >>> >>> I

Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-06-01 Thread John Fastabend
On 05/31/2018 06:00 PM, Eric Dumazet wrote: > On Thu, May 31, 2018 at 7:32 PM John Fastabend > wrote: >> >> >> Hi Wei, >> >> Thanks for the report and fix. It would be better to fix the >> root cause so that IPv6 works as intended. >> >> I'm testing the following now, >> >> Author: John Fastabend

Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-05-31 Thread Eric Dumazet
On Thu, May 31, 2018 at 7:32 PM John Fastabend wrote: > > > Hi Wei, > > Thanks for the report and fix. It would be better to fix the > root cause so that IPv6 works as intended. > > I'm testing the following now, > > Author: John Fastabend > Date: Thu May 31 14:38:59 2018 -0700 > > sockmap:

Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-05-31 Thread John Fastabend
On 05/30/2018 02:29 PM, Wei Wang wrote: > From: Wei Wang > > Sock hash only supports IPv4 socket proto right now. > If a non-IPv4 socket gets stored in the BPF map, sk->sk_prot gets > overwritten with the v4 tcp prot. > > Syskaller reported the following related issue on an IPv6 socket: > BUG: K

[PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-05-30 Thread Wei Wang
From: Wei Wang Sock hash only supports IPv4 socket proto right now. If a non-IPv4 socket gets stored in the BPF map, sk->sk_prot gets overwritten with the v4 tcp prot. Syskaller reported the following related issue on an IPv6 socket: BUG: KASAN: slab-out-of-bounds in ip6_dst_idev include/net/ip6