* Re: [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats
2026-11-26 21:11 [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats Tariq Toukan
@ 2026-11-26 21:13 ` netdev-bot+sinfo
2026-11-27 11:54 ` Daniel Zahka
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-11-26 21:13 UTC (permalink / raw)
To: Tariq Toukan
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
netdev, Paolo Abeni, Willem de Bruijn, Aleksandr Loktionov,
Boris Pismenny, Cosmin Ratiu, Daniel Zahka, Dragos Tatulea,
Gal Pressman, Leon Romanovsky, linux-rdma, Mark Bloch, Raed Salem,
Rahul Rameshbabu, Saeed Mahameed
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats
2026-11-26 21:11 [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats Tariq Toukan
2026-11-26 21:13 ` netdev-bot+sinfo
@ 2026-11-27 11:54 ` Daniel Zahka
2026-12-03 9:39 ` Paolo Abeni
2026-12-03 9:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Daniel Zahka @ 2026-11-27 11:54 UTC (permalink / raw)
To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, netdev, Paolo Abeni, Willem de Bruijn
Cc: Aleksandr Loktionov, Boris Pismenny, Cosmin Ratiu, Daniel Zahka,
Dragos Tatulea, Gal Pressman, Leon Romanovsky, linux-rdma,
Mark Bloch, Raed Salem, Rahul Rameshbabu, Saeed Mahameed
On Thu Nov 26, 2026 at 4:11 PM EST, Tariq Toukan wrote:
> mlx5e_psp_get_stats() reads the PSP flow counters into an uninitialized
> on-stack struct. mlx5e_accel_psp_fs_get_stats_fill() ignores the
> mlx5_fc_query() return value, and a failed query, e.g. -ENOLINK when the
> device is in internal error state, leaves the counter fields unset. The
> uninitialized stack values are then reported to user space through the
> PSP get-stats netlink command.
>
> Zero-initialize the struct, so the counters of a failed query read 0.
>
> Fixes: b1346219e535 ("net/mlx5e: Add PSP stats support for Rx/Tx flows")
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c
> index 73b232379263..4aacb4173b1b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c
> @@ -995,7 +995,7 @@ static void
> mlx5e_psp_get_stats(struct psp_dev *psd, struct psp_dev_stats *stats)
> {
> struct mlx5e_priv *priv = netdev_priv(psd->main_netdev);
> - struct mlx5e_psp_stats nstats;
> + struct mlx5e_psp_stats nstats = {};
>
> mlx5e_accel_psp_fs_get_stats_fill(priv, &nstats);
> stats->rx_packets = nstats.psp_rx_pkts;
>
> base-commit: e1055cbfd6eb578417f3ce983cf44462e8465267
Reviewed-by: Daniel Zahka <daniel.zahka@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats
2026-11-26 21:11 [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats Tariq Toukan
2026-11-26 21:13 ` netdev-bot+sinfo
2026-11-27 11:54 ` Daniel Zahka
@ 2026-12-03 9:39 ` Paolo Abeni
2026-12-03 9:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2026-12-03 9:39 UTC (permalink / raw)
To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, netdev, Willem de Bruijn
Cc: Aleksandr Loktionov, Boris Pismenny, Cosmin Ratiu, Daniel Zahka,
Dragos Tatulea, Gal Pressman, Leon Romanovsky, linux-rdma,
Mark Bloch, Raed Salem, Rahul Rameshbabu, Saeed Mahameed
On 11/26/26 22:11, Tariq Toukan wrote:
> mlx5e_psp_get_stats() reads the PSP flow counters into an uninitialized
> on-stack struct. mlx5e_accel_psp_fs_get_stats_fill() ignores the
> mlx5_fc_query() return value, and a failed query, e.g. -ENOLINK when the
> device is in internal error state, leaves the counter fields unset. The
> uninitialized stack values are then reported to user space through the
> PSP get-stats netlink command.
>
> Zero-initialize the struct, so the counters of a failed query read 0.
>
> Fixes: b1346219e535 ("net/mlx5e: Add PSP stats support for Rx/Tx flows")
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Since it's broken from day 1, and it's not critical, this is IMHO net-next
material at this point of the cycle.
/P
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats
2026-11-26 21:11 [PATCH net] net/mlx5e: psp: Fix stack info leak in PSP device stats Tariq Toukan
` (2 preceding siblings ...)
2026-12-03 9:39 ` Paolo Abeni
@ 2026-12-03 9:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-12-03 9:50 UTC (permalink / raw)
To: Tariq Toukan
Cc: andrew+netdev, davem, edumazet, kuba, netdev, pabeni, willemb,
aleksandr.loktionov, borisp, cratiu, daniel.zahka, dtatulea, gal,
leon, linux-rdma, mbloch, raeds, rrameshbabu, saeedm
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 26 Nov 2026 23:11:15 +0200 you wrote:
> mlx5e_psp_get_stats() reads the PSP flow counters into an uninitialized
> on-stack struct. mlx5e_accel_psp_fs_get_stats_fill() ignores the
> mlx5_fc_query() return value, and a failed query, e.g. -ENOLINK when the
> device is in internal error state, leaves the counter fields unset. The
> uninitialized stack values are then reported to user space through the
> PSP get-stats netlink command.
>
> [...]
Here is the summary with links:
- [net] net/mlx5e: psp: Fix stack info leak in PSP device stats
https://git.kernel.org/netdev/net-next/c/f996d0d8ae18
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread