Re: [PATCH net-next v2] net: usb: cx82310_eth: bound partial-frame remainder by current skb length

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.netdev
Message-ID <[email protected]>
On Mon, 17 Aug 2026 21:54:34 +0200 Jason Winter wrote:
> @@ -251,6 +251,13 @@ static int cx82310_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>  	 * end of that packet at the beginning.
>  	 */
>  	if (dev->partial_rem) {
> +		if (dev->partial_rem > skb->len) {
> +			netdev_err(dev->net,
> +				   "RX partial frame: need %lu, got %u\n",
> +				   dev->partial_rem, skb->len);
> +			dev->partial_rem = 0;
> +			return 0;

Always ratelimit datapath prints.
You should probably increment rx_errors as well / instead.
-- 
pw-bot: cr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.