[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJbwZ9TqC_ry2O9QCzp3SJtUcXept_SkKY=DEMTP61zwg@mail.gmail.com>
Date: Thu, 7 Nov 2019 08:45:32 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: David Ahern <dsahern@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] ipv6: fixes rt6_probe() and fib6_nh->last_probe init
On Thu, Nov 7, 2019 at 8:37 AM David Ahern <dsahern@...il.com> wrote:
>
> On 11/6/19 7:45 PM, Eric Dumazet wrote:
> > While looking at a syzbot KCSAN report [1], I found multiple
> > issues in this code :
> >
> > 1) fib6_nh->last_probe has an initial value of 0.
> >
> > While probably okay on 64bit kernels, this causes an issue
> > on 32bit kernels since the time_after(jiffies, 0 + interval)
> > might be false ~24 days after boot (for HZ=1000)
> >
> > 2) The data-race found by KCSAN
> > I could use READ_ONCE() and WRITE_ONCE(), but we also can
> > take the opportunity of not piling-up too many rt6_probe_deferred()
> > works by using instead cmpxchg() so that only one cpu wins the race.
> >
>
> ...
>
> > Fixes: cc3a86c802f0 ("ipv6: Change rt6_probe to take a fib6_nh")
>
> That commit only moves the location of last_probe, from fib6_info into
> fib6_nh. Given that I would expect the same problem to exist with the
> previous code. Agree? Point being should this be backported to older
> stable releases since said commit is new to 5.2?
Yes, the commit adding last probe went in 4.19
Fixes: f547fac624be ("ipv6: rate-limit probes for neighbourless routes")
Thanks.
Powered by blists - more mailing lists