Re: [PATCH net] ipv4: remove warning in ip_recv_error

2018-05-24 Thread Willem de Bruijn
On Thu, May 24, 2018 at 10:18 PM, David Miller wrote: > From: Willem de Bruijn > Date: Wed, 23 May 2018 14:29:52 -0400 > >> From: Willem de Bruijn >> >> A precondition check in ip_recv_error triggered on an otherwise benign >> race. Remove the warning. >> >> The warning triggers when passing an

Re: [PATCH net] ipv4: remove warning in ip_recv_error

2018-05-24 Thread David Miller
From: Willem de Bruijn Date: Wed, 23 May 2018 14:29:52 -0400 > From: Willem de Bruijn > > A precondition check in ip_recv_error triggered on an otherwise benign > race. Remove the warning. > > The warning triggers when passing an ipv6 socket to this ipv4 error > handling function. RaceFuzzer w

Re: WARNING in ip_recv_error

2018-05-24 Thread Paolo Abeni
nected to a v4 address is > > > sufficient to ensure that no ipv6 packets are queued for reception. > > > > > > diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c > > > index 4d780c7f0130..a975d6311341 100644 > > > --- a/net/ipv6/ipv6_sockg

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
est that the >>>> error queue is empty, and then take its lock for the duration of the >>>> operation. >>> >>> Actually, no reason to hold the lock. This setsockopt holds the socket >>> lock, which connect would need, too. So testing that the queue >>> is empty after testi

[PATCH net] ipv4: remove warning in ip_recv_error

2018-05-23 Thread Willem de Bruijn
From: Willem de Bruijn A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning triggers when passing an ipv6 socket to this ipv4 error handling function. RaceFuzzer was able to trigger it due to a race in setsockopt IPV6_ADDRFORM. --- CPU

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
ddress is >> sufficient to ensure that no ipv6 packets are queued for reception. >> >> diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c >> index 4d780c7f0130..a975d6311341 100644 >> --- a/net/ipv6/ipv6_sockglue.c >> +++ b/net/ipv6/ipv6_sockglue.c >>

Re: WARNING in ip_recv_error

2018-05-20 Thread Willem de Bruijn
ufficient to ensure that no ipv6 packets are queued for reception. > > diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c > index 4d780c7f0130..a975d6311341 100644 > --- a/net/ipv6/ipv6_sockglue.c > +++ b/net/ipv6/ipv6_sockglue.c > @@ -199,6 +199,11 @@ static int do_ipv6_setsockopt(struct sock *sk, >

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
if (ipv6_only_sock(sk) || !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) { retv = -EADDRNOTAVAIL; break; } + if (!skb_queue_empty(&sk->sk_error_queue)) { + retv = -EBUSY; + break; + } + fl6_free_socklist(sk); __ipv6_sock_mc_close(sk); After this it should be safe to remove the warning in ip_recv_error.

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 2:44 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn > wrote: >> On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >>> From: Eric Dumazet >>> Date: Fri, 18 May 2018 08:30:43 -0700 >>> We probably need to revert Willem patch

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >> From: Eric Dumazet >> Date: Fri, 18 May 2018 08:30:43 -0700 >> >>> We probably need to revert Willem patch >>> (7ce875e5ecb8562fd44040f69bda96c999e38bbc) >> >> Is it really valid

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: > From: Eric Dumazet > Date: Fri, 18 May 2018 08:30:43 -0700 > >> We probably need to revert Willem patch >> (7ce875e5ecb8562fd44040f69bda96c999e38bbc) > > Is it really valid to reach ip_recv_err with an ipv6 socket? I guess the issue is tha

Re: WARNING in ip_recv_error

2018-05-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 May 2018 08:30:43 -0700 > We probably need to revert Willem patch > (7ce875e5ecb8562fd44040f69bda96c999e38bbc) Is it really valid to reach ip_recv_err with an ipv6 socket?

Re: WARNING in ip_recv_error

2018-05-18 Thread Eric Dumazet
On 05/18/2018 05:08 AM, DaeRyong Jeong wrote: > We report the crash: WARNING in ip_recv_error > (I resend the email since I mistakenly missed the subject in my previous > email. I'm sorry.) > > > This crash has been found in v4.17-rc1 using RaceFuzzer (a modified > ve

WARNING in ip_recv_error

2018-05-18 Thread DaeRyong Jeong
We report the crash: WARNING in ip_recv_error (I resend the email since I mistakenly missed the subject in my previous email. I'm sorry.) This crash has been found in v4.17-rc1 using RaceFuzzer (a modified version of Syzkaller), which we describe more at the end of this report. Our ana