Re: [PATCH net v2] net/mlx5: fix a stack over-read in the QP debugfs

From: patchwork-bot+netdevbpf

Date: Mon Nov 30 2026 - 11:10:57 EST


Hello:

This patch was applied to netdev/net.git (main)
by Willem de Bruijn <willemb@xxxxxxxxxx>:

On Sun, 22 Nov 2026 22:51:52 +0800 you wrote:
> dbg_read() formats the field into char tbuf[18] and passes the return
> value of snprintf() to simple_read_from_buffer() as the number of
> available bytes. snprintf() returns the length the output would have
> had, not the number of bytes written, so when the string does not fit
> that value is larger than the buffer: the longest QP transport string is
> "Invalid transport type" (22 characters), so with the trailing newline
> the function returns 23 while only 18 bytes were written.
>
> [...]

Here is the summary with links:
- [net,v2] net/mlx5: fix a stack over-read in the QP debugfs
https://git.kernel.org/netdev/net/c/622f31147e57

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