Thread (2 messages) flat view 2 messages, 2 authors, 23d ago

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

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-18 17:21:51
Also in: linux-usb

On Mon, 17 Aug 2026 21:54:34 +0200 Jason Winter wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help