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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iL+2NeV59p57bN+hc+vWB61DWWjRKAoit-=QHXC0C=RBg@mail.gmail.com>
Date: Wed, 4 Dec 2024 14:38:14 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com, 
	syzbot+1939f24bdb783e9e43d9@...kaller.appspotmail.com
Subject: Re: [PATCH net] net: avoid potential UAF in default_operstate()

On Wed, Dec 4, 2024 at 1:57 PM Vladimir Oltean <vladimir.oltean@....com> wrote:
>
> On Wed, Dec 04, 2024 at 12:46:11PM +0100, Eric Dumazet wrote:
> > On Wed, Dec 4, 2024 at 12:41 PM Vladimir Oltean <vladimir.oltean@....com> wrote:
> > >
> > > I meant: linkwatch runs periodically, via linkwatch_event(). Isn't there
> > > a chance that linkwatch_event() can run once, immediately after
> > > __rtnl_unlock() in netdev_run_todo(), while the netdev is in the
> > > NETREG_UNREGISTERING state? Won't that create problems for __dev_get_by_index()
> > > too? I guess it depends on when the netns is torn down, which I couldn't find.
> >
> > I think lweventlist_lock and dev->link_watch_list are supposed to
> > synchronize things.
> >
> > linkwatch_sync_dev() only calls linkwatch_do_dev() if the device was
> > atomically unlinked from lweventlist
>
> No, I don't mean calls from linkwatch_sync_dev(). I mean other call
> paths towards linkwatch_do_dev(), like for example linkwatch_fire_event() -
> carrier down, whatever. Can't these be pending on an unregistering
> net_device at the time we run __rtnl_unlock() in netdev_run_todo?
> Otherwise, why would netdev_wait_allrefs_any() have a linkwatch_run_queue()
> call just later?

I do not know, this predates git history.

All these questions seem orthogonal.
My patch fixes an issue added recently. not something added 10 years ago.
I suggest we fix proven issues first, step by step.
If you want to take over and send a series, just say so.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ