lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96f8e9d7-6e4c-4f7a-bb66-a3b43e30182a@oracle.com>
Date: Tue, 8 Jul 2025 08:34:39 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: Simon Horman <horms@...nel.org>
Cc: sgoutham@...vell.com, andrew+netdev@...n.ch, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        darren.kenny@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: [External] : Re: [PATCH net] net: thunderx: Fix format-truncation
 warning in bgx_acpi_match_id()



On 7/8/2025 12:46 AM, Simon Horman wrote:
>>    drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1434:23: note:
>> directive argument in the range [0, 255]
>>      snprintf(bgx_sel, 5, "BGX%d", bgx->bgx_id);
>>                           ^~~~~~~
>>    drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1434:2: note:
>> ‘snprintf’ output between 5 and 7 bytes into a destination of size 5
>>      snprintf(bgx_sel, 5, "BGX%d", bgx->bgx_id);
>>
>> compiler warning due to insufficient snprintf buffer size.
>>
>> Signed-off-by: Alok Tiwari<alok.a.tiwari@...cle.com>
> Thanks Alok,
> 
> I agree this is a good change.
> 
> However, by my reading the range of values of bgx->bgx_id is 0 - 8
> because of the application of BGX_ID_MASK which restricts the
> value to 3 bits.
> 
> If so, I don't think this is a bug and it should be targeted at net-next.
> With a description of why it is not a bug.
> 
> Conversely, you think it is a bug, then I think an explanation as to why
> would be nice to add to the commit description.  And A fixes tag is needed.

Thanks Simon,
It is compile warning, We can target it for net-next.

I will resend it with [PATCH net-next]

Thanks,
Alok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ