Thread (3 messages) flat view 3 messages, 3 authors, 1d ago

Re: [PATCH net v2] gtp: add synchronize_net() in gtp_newlink() error path to prevent use-after-free

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-08-24 18:41:04
Also in: lkml

Hello:

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

On Wed, 19 Aug 2026 22:07:35 -0400 you wrote:
gtp_newlink()'s error path frees tid_hash and addr_hash without
waiting for an RCU grace period after clearing sk_user_data. A
concurrent gtp_encap_recv() in softirq may still hold the gtp_dev
pointer obtained via rcu_dereference_sk_user_data() and access the
freed memory.

  BUG: KASAN: slab-use-after-free in gtp0_pdp_find+0x1f6/0x200 (gtp.c:152)
  Call Trace:
   <IRQ>
   gtp0_pdp_find+0x1f6/0x200
   gtp_encap_recv+0x527/0x24b0
   udp_queue_rcv_one_skb+0x75f/0xc10

[...]
Here is the summary with links:
  - [net,v2] gtp: add synchronize_net() in gtp_newlink() error path to prevent use-after-free
    https://git.kernel.org/netdev/net/c/d989e22ae980

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