linux/drivers/net/can/usb
Vincent Mailhol 5408824636 can: peak_usb: fix use after free bugs
[ Upstream commit 50aca891d7 ]

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: 0a25e1f4f1 ("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-01-27 11:05:39 +01:00
..
kvaser_usb can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits 2020-11-24 13:27:23 +01:00
peak_usb can: peak_usb: fix use after free bugs 2021-01-27 11:05:39 +01:00
ems_usb.c can: ems_usb: Fix memory leak on ems_usb_disconnect() 2018-07-30 11:04:27 +02:00
esd_usb2.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
gs_usb.c can: gs_usb: fix endianess problem with candleLight firmware 2020-12-02 08:48:12 +01:00
Kconfig can: kvaser_usb: Add support for Kvaser USB hydra family 2018-07-27 10:40:19 +02:00
Makefile can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c 2018-07-27 10:40:19 +02:00
mcba_usb.c can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb() 2020-11-24 13:27:22 +01:00
ucan.c can: ucan: fix non-atomic allocation in completion handler 2019-12-13 08:52:49 +01:00
usb_8dev.c can: usb_8dev: fix use-after-free on disconnect 2019-11-12 19:20:43 +01:00