[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <92e86620-3457-6ca1-6888-fdbcdf0a4e4e@gmail.com>
Date: Tue, 22 Mar 2022 07:03:59 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Ziyang Xuan <william.xuanziyang@...wei.com>, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org
Cc: edumazet@...gle.com, brianvv@...gle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/3] net: ipvlan: fix potential UAF problem
for phy_dev
On 3/19/22 02:52, Ziyang Xuan wrote:
> There is a known scenario can trigger UAF problem for lower
> netdevice as following:
But this known scenario never happens.
So maybe you should not add it 'in the future'
>
> Someone module puts the NETDEV_UNREGISTER event handler to a
> work, and lower netdevice is accessed in the work handler. But
> when the work is excuted, lower netdevice has been destroyed
> because upper netdevice did not get reference to lower netdevice
> correctly.
Again, whoever would like to use a work queue would also
need to hold a reference on the device.
Regardless of ipvlan being used or not.
>
> Although it can not happen for ipvlan now because there is no
> way to access phy_dev outside ipvlan. But it is necessary to
> add the reference operation to phy_dev to avoid the potential
> UAF problem in the future.
>
> Signed-off-by: Ziyang Xuan <william.xuanziyang@...wei.com>
> ---
Your patch makes no sense to me really.
Powered by blists - more mailing lists