Re: [PATCH net] can: peak_usb: accept short uCAN end-of-list records
From: Marc Kleine-Budde
Date: Wed Oct 21 2026 - 05:13:34 EST
Stéphane,
can you have a look at this?
On 19.10.2026 00:46:34, Liu Changjie wrote:
> A PCAN-USB FD v2 running firmware 3.2.0 sends a 16-byte status
> record followed by a four-byte zero-size end marker. These transfers
> cause repeated receive-buffer dumps while the interface is up.
>
> pcan_usb_fd_decode_buf() requires a complete 12-byte struct pucan_msg
> before checking the size field, so it rejects the end marker with
> -EBADMSG.
>
> Check that the size field is present before testing for an end marker.
> Require the full header for nonzero-size records and keep the remaining
> record and payload length checks.
>
> Fixes: 93fcab2c6968 ("can: peak_usb: validate uCAN receive record lengths")
> Assisted-by: LLM
> Signed-off-by: Liu Changjie <liucj1228@xxxxxxxxxxx>
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature