lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Jun 2022 09:18:47 -0700
From:   Francesco Ruggeri <fruggeri@...sta.com>
To:     Andy Roulin <aroulin@...dia.com>
Cc:     Stephen Hemminger <stephen@...workplumber.org>,
        netdev@...r.kernel.org
Subject: Re: neighbour netlink notifications delivered in wrong order

On Thu, Jun 9, 2022 at 9:40 AM Francesco Ruggeri <fruggeri@...sta.com> wrote:
>
> On Mon, Jun 6, 2022 at 7:07 PM Andy Roulin <aroulin@...dia.com> wrote:
> >
> > Below is the patch I have been using and it has worked for me. I didn't
> > get a chance yet to test all cases or with net-next but I am planning to
> > send upstream.
>
> Thanks Andy, the patch fixes the reordering that I was seeing in my
> failure scenario.

I think that with this patch there may still be a narrower race
condition, though probably not as bad.
The patch guarantees that the notification is for the latest state change,
but not necessarily the change that initiated the notification.
In this scenario:

n->nud_state = STALE
write_unlock_bh(n->lock)
                       n->nud_state = REACHABLE
                       write_unlock_bh(n->lock)
                       neigh_notify
neigh_notify

wouldn't both notifications be for REACHABLE?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ