linux-IllusionX/net/can
Oliver Hartkopp c275a176e4 can: raw: add missing refcount for memory leak fix
Commit ee8b94c851 ("can: raw: fix receiver memory leak") introduced
a new reference to the CAN netdevice that has assigned CAN filters.
But this new ro->dev reference did not maintain its own refcount which
lead to another KASAN use-after-free splat found by Eric Dumazet.

This patch ensures a proper refcount for the CAN nedevice.

Fixes: ee8b94c851 ("can: raw: fix receiver memory leak")
Reported-by: Eric Dumazet <edumazet@google.com>
Cc: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20230821144547.6658-3-socketcan@hartkopp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-22 17:18:50 -07:00
..
j1939 sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
af_can.c
af_can.h
bcm.c can: bcm: Fix UAF in bcm_proc_show() 2023-07-17 09:46:26 +02:00
gw.c
isotp.c can: isotp: fix support for transmission of SF without flow control 2023-08-22 17:18:50 -07:00
Kconfig
Makefile
proc.c
raw.c can: raw: add missing refcount for memory leak fix 2023-08-22 17:18:50 -07:00