mirror-linux/drivers/net/can/usb
Vincent Mailhol a1ad2109ce can: etas_es58x: fix potential NULL pointer dereference on udev->serial
The driver assumed that es58x_dev->udev->serial could never be NULL.
While this is true on commercially available devices, an attacker
could spoof the device identity providing a NULL USB serial number.
That would trigger a NULL pointer dereference.

Add a check on es58x_dev->udev->serial before accessing it.

Reported-by: yan kang <kangyan91@outlook.com>
Reported-by: yue sun <samsun1006219@gmail.com>
Closes: https://lore.kernel.org/linux-can/SY8P300MB0421E0013C0EBD2AA46BA709A1F42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/
Fixes: 9f06631c3f ("can: etas_es58x: export product information through devlink_ops::info_get()")
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://patch.msgid.link/20250204154859.9797-2-mailhol.vincent@wanadoo.fr
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-02-08 12:41:43 +01:00
..
etas_es58x can: etas_es58x: fix potential NULL pointer dereference on udev->serial 2025-02-08 12:41:43 +01:00
kvaser_usb can: kvaser_usb: Add support for CAN_CTRLMODE_BERR_REPORTING 2025-01-10 11:32:38 +01:00
peak_usb move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Kconfig can: usb: Kconfig: Fix list of devices for esd_usb driver 2024-09-11 10:46:53 +02:00
Makefile can: usb: f81604: add Fintek F81604 support 2023-05-15 22:53:49 +02:00
ems_usb.c can: ems_usb: ems_usb_rx_err(): fix {rx,tx}_errors statistics 2024-11-26 10:51:06 +01:00
esd_usb.c can: esd_usb: Remove CAN_CTRLMODE_3_SAMPLES for CAN-USB/3-FD 2024-09-12 09:40:09 +02:00
f81604.c can: f81604: f81604_handle_can_bus_errors(): fix {rx,tx}_errors statistics 2024-11-26 10:51:12 +01:00
gs_usb.c can: gs_usb: add usb endpoint address detection at driver probe step 2024-11-26 10:14:11 +01:00
mcba_usb.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ucan.c can: ucan: Remove repeated word 2023-07-19 09:04:36 +02:00
usb_8dev.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00