Re: [PATCH v2] net: hso: cap the MTU and drop oversized frames
From: Simon Horman
Date: Sat Nov 28 2026 - 10:24:43 EST
On Fri, Nov 20, 2026 at 05:53:37PM +0800, Aibing Chen wrote:
> Hi,
>
> Same provenance as for v1: the missing bound was found by code inspection,
> after the automated review of the companion skb_tx_buf fix in this driver
> reported that hso_net_start_xmit() copies skb->len bytes into the fixed
> 2048 byte mux_bulk_tx_buf without a bound check, and that hso_net_init()
> never sets max_mtu.
>
> The overflow itself was not triggered at runtime; it is statically
> decidable from the code. The additional paths listed in the review of v1
> (AF_PACKET with PACKET_VNET_HDR, tpacket_snd() with a vnet header, and a
> route MTU metric above the device MTU) are covered by the length check
> added in v2, which drops such frames with SKB_DROP_REASON_PKT_TOO_BIG and
> tx_dropped accounting.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>