Re: [PATCH net] can: can327: Fix stack out-of-bounds write in can327_handle_prompt()

From: Marc Kleine-Budde

Date: Wed Aug 19 2026 - 02:24:09 EST


On 19.08.2026 14:42:01, Baul Lee wrote:
> can327_handle_prompt() hexdumps the frame queued for transmission, two
> hex characters per payload byte, into an 18-byte on-stack buffer sized
> for a classical 8-byte payload. The loop runs frame->len times without a
> clamp, and frame is a struct can_frame copied verbatim from the skb
> passed to can327_netdev_start_xmit().
>
> A CAN XL frame aliases struct can_frame such that canxl_frame.flags,

I've a patch pending, that drops CAN_XL frames on non CAN_XL interfaces:

https://lore.kernel.org/all/20260731-drop_canxl_frames-v1-1-7387b70353b3@xxxxxxxxxx/

So I think this patch is not needed.

regards,
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