WSL2-Linux-Kernel/drivers/net/can/usb/peak_usb
Vincent Mailhol 50aca891d7 can: peak_usb: fix use after free bugs
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>
2021-01-20 13:33:28 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pcan_usb.c can: drivers: add len8_dlc support for various CAN adapters 2020-11-20 12:05:14 +01:00
pcan_usb_core.c can: pcan_usb_core: fix fall-through warnings for Clang 2020-11-29 21:19:11 +01:00
pcan_usb_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
pcan_usb_fd.c can: peak_usb: fix use after free bugs 2021-01-20 13:33:28 +01:00
pcan_usb_pro.c can: replace can_dlc as variable/element for payload length 2020-11-20 12:04:12 +01:00
pcan_usb_pro.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00