Re: [PATCH net v3] net: do not leave a dangling sk pointer, when socket creation fails

patchwork-bot+netdevbpf
2024-06-20T09:20:28Z

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 17 Jun 2024 22:02:05 +0100 you wrote:
> It is possible to trigger a use-after-free by:
> * attaching an fentry probe to __sock_release() and the probe calling the
> bpf_get_socket_cookie() helper
> * running traceroute -I 1.1.1.1 on a freshly booted VM
>
> A KASAN enabled kernel will log something like below (decoded and stripped):
> ==================================================================
> BUG: KASAN: slab-use-after-free in __sock_gen_cookie (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-instrumented.h:1611 net/core/sock_diag.c:29)
> Read of size 8 at addr ffff888007110dd8 by task traceroute/299
>
> [...]

Here is the summary with links:
- [net,v3] net: do not leave a dangling sk pointer, when socket creation fails
https://git.kernel.org/netdev/net/c/6cd4a78d962b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.