[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230604104718.4bf45faf@kernel.org>
Date: Sun, 4 Jun 2023 10:47:18 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ding Hui <dinghui@...gfor.com.cn>
Cc: Alexander Duyck <alexander.duyck@...il.com>,
Andrew Lunn <andrew@...n.ch>, davem@...emloft.net,
edumazet@...gle.com, 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
On Sat, 3 Jun 2023 15:11:29 +0800 Ding Hui wrote:
> Yes.
>
> I checked the others ioctl (e.g. ethtool_get_eeprom(), ethtool_get_features()),
> and searched the git log of ethtool utility, so I think that is an implicit
> rule and the check is missed in kernel where the patch involves.
>
> Without this rule, we cannot guarantee the safety of copy to user.
>
> Should we keep to be compatible with that incorrect userspace usage?
If such incorrect user space exists we do, if it doesn't we don't.
Problem is that we don't know what exists out there.
Maybe we can add a pr_err_once() complaining about bad usage for now
and see if anyone reports back that they are hitting it?
Powered by blists - more mailing lists