TencentOS-kernel/drivers/net/can/usb
Vincent Mailhol 7f85e56e2d can: peak_usb: fix use after free bugs
[ Upstream commit 50aca891d7a554db0901b245167cd653d73aaa71 ]

After calling peak_usb_netif_rx_ni(skb), dereferencing skb is unsafe.
Especially, the can_frame cf which aliases skb memory is accessed
after the peak_usb_netif_rx_ni().

Reordering the lines solves the issue.

Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters")
Link: https://lore.kernel.org/r/20210120114137.200019-4-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-12 12:51:36 +08:00
..
kvaser_usb can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits 2021-03-16 16:41:21 +08:00
peak_usb can: peak_usb: fix use after free bugs 2021-04-12 12:51:36 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ems_usb.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
esd_usb2.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gs_usb.c can: gs_usb: fix endianess problem with candleLight firmware 2021-03-16 16:41:46 +08:00
mcba_usb.c can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb() 2021-03-16 16:41:18 +08:00
ucan.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
usb_8dev.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00