Re: [PATCH] bnx2x: Fix firmware version string character counts

From: patchwork-bot+netdevbpf
Date: Sat Jan 27 2024 - 00:10:51 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Thu, 25 Jan 2024 20:10:48 -0800 you wrote:
> A potential string truncation was reported in bnx2x_fill_fw_str(),
> when a long bp->fw_ver and a long phy_fw_ver might coexist, but seems
> unlikely with real-world hardware.
>
> Use scnprintf() to indicate the intent that truncations are tolerated.
>
> While reading this code, I found a collection of various buffer size
> counting issues. None looked like they might lead to a buffer overflow
> with current code (the small buffers are 20 bytes and might only ever
> consume 10 bytes twice with a trailing %NUL). However, early truncation
> (due to a %NUL in the middle of the string) might be happening under
> likely rare conditions. Regardless fix the formatters and related
> functions:
>
> [...]

Here is the summary with links:
- bnx2x: Fix firmware version string character counts
https://git.kernel.org/netdev/net-next/c/5642c82b9463

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html