linux/drivers/net
Greg Kroah-Hartman 38a01c9700 can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message
When looking at the data in a USB urb, the actual_length is the size of
the buffer passed to the driver, not the transfer_buffer_length which is
set by the driver as the max size of the buffer.

When parsing the messages in ems_usb_read_bulk_callback() properly check
the size both at the beginning of parsing the message to make sure it is
big enough for the expected structure, and at the end of the message to
make sure we don't overflow past the end of the buffer for the next
message.

Cc: Vincent Mailhol <mailhol@kernel.org>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2026022316-answering-strainer-a5db@gregkh
Fixes: 702171adee ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-03-02 11:03:42 +01:00
..
arcnet Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bonding Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
caif treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
can can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message 2026-03-02 11:03:42 +01:00
dsa Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
ethernet amd-xgbe: fix MAC_TCR_SS register width for 2.5G and 10M speeds 2026-02-28 14:22:34 -08:00
fddi
fjes Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hamradio Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hyperv Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ieee802154 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ipa Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ipvlan Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mctp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mdio net: mdio: rtl9300: use scoped for loops 2025-12-28 08:55:48 +01:00
netdevsim Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ovpn Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
pcs Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
phy Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
plip
ppp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pse-pd Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
slip Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
team Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
thunderbolt net: thunderbolt: Allow reading link settings 2026-01-19 12:09:58 -08:00
usb net: usb: r8152: add TRENDnet TUC-ET2G 2026-02-27 19:27:31 -08:00
vmxnet3 net: vmxnet3: convert to use .get_rx_ring_count 2025-11-19 20:14:21 -08:00
vxlan Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wan Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
wireguard Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wireless Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
wwan Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
xen-netback Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
amt.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
bareudp.c
dummy.c
eql.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
geneve.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gtp.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ifb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig printk: add CONFIG_PRINTK dependency for netconsole 2026-02-17 13:04:20 +01:00
LICENSE.SRC
loopback.c
macsec.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
macvlan.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
macvtap.c
Makefile net: remove HIPPI support and RoadRunner HIPPI driver 2026-01-20 19:12:06 -08:00
mdio.c
mhi_net.c
mii.c
net_failover.c net: remove unnecessary module_init/exit functions 2026-02-02 17:25:23 -08:00
netconsole.c Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
netkit.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
nlmon.c
ntb_netdev.c
pfcp.c
rionet.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Space.c
sungem_phy.c net: sungem_phy: Fix a typo error in sungem_phy 2025-11-04 17:00:55 -08:00
tap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tun.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tun_vnet.h virtio-net: avoid unnecessary checksum calculation on guest RX 2025-11-26 19:45:54 -08:00
veth.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
virtio_net.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vrf.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vsockmon.c
xen-netfront.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00