Linux CAN drivers development
 help / color / mirror / Atom feed
* [PATCH 0/2] can: kvaser_usb: validate values received from the device
@ 2026-11-10  3:56 Joas Antonio dos Santos via B4 Relay
  2026-11-10  3:56 ` [PATCH 1/2] can: kvaser_usb: hydra: reject commands shorter than the header Joas Antonio dos Santos via B4 Relay
  2026-11-10  3:56 ` [PATCH 2/2] can: kvaser_usb: reject devices reporting zero max outstanding tx Joas Antonio dos Santos via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Joas Antonio dos Santos via B4 Relay @ 2026-11-10  3:56 UTC (permalink / raw)
  To: mkl, mailhol, joasantonio108; +Cc: linux-can, linux-kernel, stable

Two fixes for values that kvaser_usb takes from the USB device without
checking them.

Patch 1 rejects hydra commands whose length is shorter than the command
header, which otherwise stall the command loops.

Patch 2 rejects devices that report zero max outstanding tx, which
otherwise leads to a division by zero.

These issues were found with the help of an LLM-based code review tool
(Claude).  I checked the code paths by hand against v7.4-rc3 and
reviewed the fixes myself.  They are build-tested only (W=1, arm64); I
do not have the hardware to test them at runtime.

---
Joas Antonio dos Santos (2):
      can: kvaser_usb: hydra: reject commands shorter than the header
      can: kvaser_usb: reject devices reporting zero max outstanding tx

 drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c  | 6 ++++++
 drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
---
base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9
change-id: 20261110-kvaser-usb-validate-33c2e34b63bf

Best regards,
-- 
Joas Antonio dos Santos <joasantonio108@gmail.com>



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

end of thread, other threads:[~2026-11-11 20:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10  3:56 [PATCH 0/2] can: kvaser_usb: validate values received from the device Joas Antonio dos Santos via B4 Relay
2026-11-10  3:56 ` [PATCH 1/2] can: kvaser_usb: hydra: reject commands shorter than the header Joas Antonio dos Santos via B4 Relay
2026-11-10  4:08   ` sashiko-bot
2026-11-11 20:27   ` netdev-bot+sashiko
2026-11-10  3:56 ` [PATCH 2/2] can: kvaser_usb: reject devices reporting zero max outstanding tx Joas Antonio dos Santos via B4 Relay

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