[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8a3e3e7-295a-4cde-9d2f-73b5df4200d9@intel.com>
Date: Mon, 15 Sep 2025 15:18:35 +0200
From: Konrad Leszczynski <konrad.leszczynski@...el.com>
To: Andrew Lunn <andrew@...n.ch>, Sebastian Basierski
<sebastian.basierski@...el.com>
CC: Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>,
<andrew+netdev@...n.ch>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<cezary.rojewski@...el.com>
Subject: Re: [PATCH net 1/3] net: stmmac: replace memcpy with strscpy in
ethtool
On 04-Sep-25 21:18, Andrew Lunn wrote:
> On Thu, Sep 04, 2025 at 08:53:03PM +0200, Sebastian Basierski wrote:
>> On 9/1/2025 9:59 PM, Jakub Kicinski wrote:
>>> On Thu, 28 Aug 2025 12:02:35 +0200 Konrad Leszczynski wrote:
>>>> Fix kernel exception by replacing memcpy with strscpy when used with
>>>> safety feature strings in ethtool logic.
>>>>
>>>> [ +0.000023] BUG: KASAN: global-out-of-bounds in stmmac_get_strings+0x17d/0x520 [stmmac]
>>>> [ +0.000115] Read of size 32 at addr ffffffffc0cfab20 by task ethtool/2571
>>> If you hit this with upstream code please mention which string
>>> is not padded. If this can't happen with upstream platforms --
>>> there is no upstream bug. BTW ethtool_puts() is a better choice.
>> Hi Jakub,
>> Sorry for late answer to your review.
>> I double checked and made sure this bug reproduces on upstream platform.
>> Bug seems to appear on first string - i will add this information to commit
>> message.
> By first string, do you mean "Application Transmit Interface Parity
> Check Error"?
>
> I think it also would be better to change dwmac5_error_desc, so that
> it uses char stat_string[ETH_GSTRING_LEN] __nonstring; like
> stmmac_stats.
>
> Andrew
Hi Andrew,
Thanks for your comments. We can add the change as a new patch as part
of this patchset. Would that be ok?
Powered by blists - more mailing lists