[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ece228a3-5c31-4390-b6ba-ec3f2b6c5dcb@lunn.ch>
Date: Fri, 2 Jun 2023 18:37:08 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Alexander Duyck <alexander.duyck@...il.com>
Cc: Ding Hui <dinghui@...gfor.com.cn>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
pengdonglin@...gfor.com.cn, huangcun@...gfor.com.cn
Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user
> What this change is essentially doing is clamping the copied data to
> the lesser of the current value versus the value when the userspace
> was allocated. However I am wondering now if we shouldn't just update
> the size value and return that as some sort of error for the userspace
> to potentially reallocate and repeat until it has the right size.
I'm not sure we should be putting any effort into the IOCTL
interface. It is deprecated. We should fix overrun problems, but i
would not change the API. Netlink handles this atomically, and that is
the interface tools should be using, not this IOCTL.
Andrew
Powered by blists - more mailing lists