[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241204143521.z5hccxlz2vnyuwz5@skbuf>
Date: Wed, 4 Dec 2024 16:35:21 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Eric Dumazet <edumazet@...gle.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 Tue, Dec 03, 2024 at 05:09:33PM +0000, Eric Dumazet wrote:
> syzbot reported an UAF in default_operstate() [1]
>
> Issue is a race between device and netns dismantles.
>
> After calling __rtnl_unlock() from netdev_run_todo(),
> we can not assume the netns of each device is still alive.
>
> Make sure the device is not in NETREG_UNREGISTERED state,
> and add an ASSERT_RTNL() before the call to
> __dev_get_by_index().
>
> We might move this ASSERT_RTNL() in __dev_get_by_index()
> in the future.
>
> Fixes: 8c55facecd7a ("net: linkwatch: only report IF_OPER_LOWERLAYERDOWN if iflink is actually down")
> Reported-by: syzbot+1939f24bdb783e9e43d9@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/674f3a18.050a0220.48a03.0041.GAE@google.com/T/#u
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
> Cc: Vladimir Oltean <vladimir.oltean@....com>
> ---
For now:
Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Powered by blists - more mailing lists