[PATCH v3] net: use sock_gen_put() when sk_state is TCP_TIME_WAIT

patchwork-bot+netdevbpf at kernel.org patchwork-bot+netdevbpf at kernel.org
Thu May 1 07:10:33 PDT 2025


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba at kernel.org>:

On Tue, 29 Apr 2025 09:59:48 +0800 you wrote:
> From: Jibin Zhang <jibin.zhang at mediatek.com>
> 
> It is possible for a pointer of type struct inet_timewait_sock to be
> returned from the functions __inet_lookup_established() and
> __inet6_lookup_established(). This can cause a crash when the
> returned pointer is of type struct inet_timewait_sock and
> sock_put() is called on it. The following is a crash call stack that
> shows sk->sk_wmem_alloc being accessed in sk_free() during the call to
> sock_put() on a struct inet_timewait_sock pointer. To avoid this issue,
> use sock_gen_put() instead of sock_put() when sk->sk_state
> is TCP_TIME_WAIT.
> 
> [...]

Here is the summary with links:
  - [v3] net: use sock_gen_put() when sk_state is TCP_TIME_WAIT
    https://git.kernel.org/netdev/net/c/f920436a4429

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





More information about the Linux-mediatek mailing list