Ignat Korchagin 9df99c395d net: inet6: do not leave a dangling sk pointer in inet6_create()
sock_init_data() attaches the allocated sk pointer to the provided sock
object. If inet6_create() fails later, the sk object is released, but the
sock object retains the dangling sk pointer, which may cause use-after-free
later.

Clear the sock sk pointer on error.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-8-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-10-15 18:43:08 -07:00
..
2024-09-11 20:44:31 -07:00
2024-10-09 19:40:46 -07:00
2024-04-29 13:32:01 +01:00
2024-05-30 18:29:38 -07:00
2023-10-27 10:35:46 +01:00
2023-09-14 16:16:36 +02:00
2024-07-14 07:56:32 -07:00
2024-03-08 10:56:05 +00:00