android_kernel_motorola_sm6375/net/packet
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ignat Korchagin 71b22837a5 af_packet: avoid erroring out after sock_init_data() in packet_create()
[ Upstream commit 46f2a11cb82b657fd15bab1c47821b635e03838b ]

After sock_init_data() the allocated sk object is attached to the provided
sock object. On error, packet_create() frees the sk object leaving the
dangling pointer in the sock object on return. Some other code may try
to use this pointer and cause use-after-free.

Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Ignat Korchagin <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-12-14 19:44:51 +01:00
..
af_packet.c af_packet: avoid erroring out after sock_init_data() in packet_create() 2024-12-14 19:44:51 +01:00
diag.c af_packet: Fix data-races of pkt_sk(sk)->num. 2023-06-09 10:28:53 +02:00
internal.h packet: Move reference count in packet_sock to atomic_long_t 2023-12-13 18:18:14 +01:00
Kconfig
Makefile