Thread (2 messages) 2 messages, 2 authors, 24d ago

Re: [PATCH net] net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-09-05 20:31:12
Also in: linux-rdma, lkml

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:

On Wed, 2 Sep 2026 22:35:14 +0300 you wrote:
From: Yael Chemla <redacted>

In mlx5_eswitch_termtbl_put(), the zero-ref cleanup check reads
tt->ref_count after termtbl_mutex has been released.  Two concurrent
callers on the same mlx5_termtbl_handle race: one decrements ref_count
to zero, removes the hash entry, and calls kfree(tt) while the other
has already dropped the mutex and is about to evaluate
if (!tt->ref_count), producing a use-after-free.

[...]
Here is the summary with links:
  - [net] net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put
    https://git.kernel.org/netdev/net/c/7ee07f601f8f

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help