Re: [PATCH net] net: Fix TOCTOU issue in sk_is_readable()
From: patchwork-bot+netdevbpf
Date: Tue Jun 10 2025 - 19:38:56 EST
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Mon, 09 Jun 2025 19:08:03 +0200 you wrote:
> sk->sk_prot->sock_is_readable is a valid function pointer when sk resides
> in a sockmap. After the last sk_psock_put() (which usually happens when
> socket is removed from sockmap), sk->sk_prot gets restored and
> sk->sk_prot->sock_is_readable becomes NULL.
>
> This makes sk_is_readable() racy, if the value of sk->sk_prot is reloaded
> after the initial check. Which in turn may lead to a null pointer
> dereference.
>
> [...]
Here is the summary with links:
- [net] net: Fix TOCTOU issue in sk_is_readable()
https://git.kernel.org/netdev/net/c/2660a544fdc0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html