kernel_samsung_a53x/net/can
Ignat Korchagin 507462eb91 net: af_can: do not leave a dangling sk pointer in can_create()
[ Upstream commit 811a7ca7320c062e15d0f5b171fe6ad8592d1434 ]

On error can_create() frees the allocated sk object, but sock_init_data()
has already attached it to the provided sock object. This will leave a
dangling sk pointer in the sock object and may cause use-after-free later.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20241014153808.51894-5-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:30 +01:00
..
j1939 can: j1939: j1939_session_new(): fix skb reference counting 2024-12-17 13:24:26 +01:00
af_can.c net: af_can: do not leave a dangling sk pointer in can_create() 2024-12-17 13:24:30 +01:00
af_can.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm.c Revert "can: bcm: Remove proc entry when dev is unregistered." 2024-11-24 00:23:42 +01:00
gw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isotp.c can: isotp: isotp_sendmsg(): fix TX state detection and wait behavior 2024-11-18 10:58:47 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00