Linux CAN drivers development
 help / color / mirror / Atom feed
* [PATCH 0/5] can: peak_usb: fixes, cleanup and input validation hardening
@ 2026-10-08  9:14 Stéphane Grosjean
  2026-10-08  9:14 ` [PATCH 1/5] can: peak_usb: fix missing CAN_ERR_FLAG when reporting error counters Stéphane Grosjean
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Stéphane Grosjean @ 2026-10-08  9:14 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Dan Carpenter,
	Wolfgang Grandegger
  Cc: linux-can, linux-kernel, Stéphane Grosjean,
	Stefan Günther, stable

This series contains a mix of bug fixes, cleanups, and hardening
improvements for the PEAK-System USB CAN drivers.

The first patch fixes a bug in CAN error frame generation where
CAN_ERR_CNT accidentally overwrites previously recorded CAN error
flags. As a result, information about previously detected error
conditions may be lost when error counters are reported.

The second and third patches are cleanup changes. One makes a public
header self-contained by including all required dependencies, while
the other reorders CAN_CTRLMODE_* flags in ctrlmode_supported for
improved readability without changing driver behavior.

The remaining patches strengthen validation of data received from USB
devices. They verify device-provided CAN channel numbers before they
are used as array indexes and introduce additional bounds checking
when parsing received message buffers.

Malformed messages are now rejected consistently, preventing possible
out-of-bounds memory accesses caused by corrupted or otherwise
untrusted device input.

Signed-off-by: Stéphane Grosjean <s.grosjean@peak-system.fr>
---
Marc Kleine-Budde (1):
      can: peak_usb: add missing includes

Stefan Günther (1):
      can: peak_usb: fix missing CAN_ERR_FLAG when reporting error counters

Stéphane Grosjean (3):
      can: peak_usb: sort ctrlmode_supported flags
      can: peak_usb: validate channel numbers in PCAN-USB FD
      can: peak_usb: harden PCAN-USB message validation

 drivers/net/can/usb/peak_usb/pcan_usb.c      | 29 ++++++++-----
 drivers/net/can/usb/peak_usb/pcan_usb_core.h |  6 +++
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c   | 64 ++++++++++++++++++++--------
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c  |  3 +-
 4 files changed, 73 insertions(+), 29 deletions(-)
---
base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
change-id: 20261007-canfd_check_channel_idx-a4d7a1a1ee7d

Best regards,
--  
Stéphane Grosjean <s.grosjean@peak-system.fr>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-10  6:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08  9:14 [PATCH 0/5] can: peak_usb: fixes, cleanup and input validation hardening Stéphane Grosjean
2026-10-08  9:14 ` [PATCH 1/5] can: peak_usb: fix missing CAN_ERR_FLAG when reporting error counters Stéphane Grosjean
2026-10-08  9:14 ` [PATCH 2/5] can: peak_usb: add missing includes Stéphane Grosjean
2026-10-08  9:14 ` [PATCH 3/5] can: peak_usb: sort ctrlmode_supported flags Stéphane Grosjean
2026-10-08  9:14 ` [PATCH 4/5] can: peak_usb: validate channel numbers in PCAN-USB FD Stéphane Grosjean
2026-10-08  9:36   ` sashiko-bot
2026-10-10  6:48   ` netdev-bot+sashiko
2026-10-08  9:14 ` [PATCH 5/5] can: peak_usb: harden PCAN-USB message validation Stéphane Grosjean
2026-10-10  6:48   ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox