Subject: Re: [PATCH net-next v2] tipc: guard against string buffer overrun

From: [email-masked]
Date: Sat, 03 Aug 2024 00:30:34 +0000

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email-masked]>:

On Thu, 01 Aug 2024 19:35:37 +0100 you wrote:
> Smatch reports that copying media_name and if_name to name_parts may
> overwrite the destination.
> 
>  .../bearer.c:166 bearer_name_validate() error: strcpy() 'media_name' too large for 'name_parts->media_name' (32 vs 16)
>  .../bearer.c:167 bearer_name_validate() error: strcpy() 'if_name' too large for 'name_parts->if_name' (1010102 vs 16)
> 
> This does seem to be the case so guard against this possibility by using
> strscpy() and failing if truncation occurs.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] tipc: guard against string buffer overrun
    https://git.kernel.org/netdev/net-next/c/6555a2a9212b

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