Files
twx-linux/net/ipv4
Ignat Korchagin 25447c6aaa net: inet: do not leave a dangling sk pointer in inet_create()
[ Upstream commit 9365fa510c ]

sock_init_data() attaches the allocated sk object to the provided sock
object. If inet_create() fails later, the sk object is freed, but the
sock object retains the dangling pointer, which may create use-after-free
later.

Clear the sk pointer in the sock object 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-7-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 20:00:04 +01:00
..
2024-12-09 10:32:10 +01:00
2024-09-18 19:24:09 +02:00
2024-10-04 16:29:56 +02:00
2024-12-09 10:32:36 +01:00
2024-12-09 10:32:10 +01:00
2024-12-09 10:32:10 +01:00
2024-12-09 10:32:10 +01:00