* [PATCH RESEND] tipc: fix RCU dereference race in tipc_aead_users_dec()
@ 2026-02-03 14:56 Daniel Hodges
2026-02-05 21:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Hodges @ 2026-02-03 14:56 UTC (permalink / raw)
To: jmaloy, davem, edumazet, kuba, pabeni
Cc: horms, ying.xue, tuong.t.lien, netdev, tipc-discussion,
linux-kernel, Daniel Hodges, stable
From: Daniel Hodges <hodgesd@meta.com>
tipc_aead_users_dec() calls rcu_dereference(aead) twice: once to store
in 'tmp' for the NULL check, and again inside the atomic_add_unless()
call.
Use the already-dereferenced 'tmp' pointer consistently, matching the
correct pattern used in tipc_aead_users_inc() and tipc_aead_users_set().
Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication")
Cc: stable@vger.kernel.org
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Hodges <hodgesd@meta.com>
---
net/tipc/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index 970db62bd029..a3f9ca28c3d5 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -460,7 +460,7 @@ static void tipc_aead_users_dec(struct tipc_aead __rcu *aead, int lim)
rcu_read_lock();
tmp = rcu_dereference(aead);
if (tmp)
- atomic_add_unless(&rcu_dereference(aead)->users, -1, lim);
+ atomic_add_unless(&tmp->users, -1, lim);
rcu_read_unlock();
}
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH RESEND] tipc: fix RCU dereference race in tipc_aead_users_dec()
2026-02-03 14:56 [PATCH RESEND] tipc: fix RCU dereference race in tipc_aead_users_dec() Daniel Hodges
@ 2026-02-05 21:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-05 21:00 UTC (permalink / raw)
To: Daniel Hodges
Cc: jmaloy, davem, edumazet, kuba, pabeni, horms, ying.xue,
tuong.t.lien, netdev, tipc-discussion, linux-kernel, hodgesd,
stable
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 3 Feb 2026 09:56:21 -0500 you wrote:
> From: Daniel Hodges <hodgesd@meta.com>
>
> tipc_aead_users_dec() calls rcu_dereference(aead) twice: once to store
> in 'tmp' for the NULL check, and again inside the atomic_add_unless()
> call.
>
> Use the already-dereferenced 'tmp' pointer consistently, matching the
> correct pattern used in tipc_aead_users_inc() and tipc_aead_users_set().
>
> [...]
Here is the summary with links:
- [RESEND] tipc: fix RCU dereference race in tipc_aead_users_dec()
https://git.kernel.org/netdev/net/c/6a65c0cb0ff2
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] 2+ messages in thread
end of thread, other threads:[~2026-02-05 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 14:56 [PATCH RESEND] tipc: fix RCU dereference race in tipc_aead_users_dec() Daniel Hodges
2026-02-05 21:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox