From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20E522F363F for ; Thu, 23 Jul 2026 15:52:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784821962; cv=none; b=SG8x+BpGO0jo6U4iQWFjdwHFmA3iK4F0jMgWzWTdLLES1jz4pHrSykUdAHcYi5g7Jnxr9JHBCf2n06o2bAQrPrLzowJOOQdZuHhgUjHHzQKcc52LgsErR1kpcMwqNwaBkw/fH5Sn+i2/cgyMgSpBRYT4LdnCU4NN4akVt8Em7Yk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784821962; c=relaxed/simple; bh=o9NP2P1uOmH63zmJRqoraPAg/xqNRahVkYyIMglxZ7M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TUqZB3IRL57IqvOUtqqKjs5CEj28zsjjENwJ3pp3mspNwBhwOfLB7SytCJDfONm9+hKOineVXRajSBmnHSFEA2OhRk0S58Ia0m9fW6K4CGQe6DGkVL/qDhz7/cKiYPuLYL4OTUBg/Xkh7tdzXt1EYlJhn76vE+gK8C83g+IUCRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im; spf=pass smtp.mailfrom=fastmail.im; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b=qA3Zx1s2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IUjq0Fly; arc=none smtp.client-ip=202.12.124.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b="qA3Zx1s2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IUjq0Fly" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id B5DF11D00103; Thu, 23 Jul 2026 11:52:38 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 23 Jul 2026 11:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.im; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1784821958; x=1784908358; bh=OQNX2NfvnfJxBpndSOaFo bgsEh4H8cUsk8yd04XWkkI=; b=qA3Zx1s2iP6iIPD1PGqf8Lx7VKYrXYnGDp/LJ 1hvLopozp1doz6+mmQigGPMFKGUDgc6c53U+qWMcAc8UvmgdHn7Fh9GlcUOi94Jd hBh2AfJXK7CuJxzc1rlYU/fRAO/9q3k/BR+opI9DfExMSxf3vzogr+DUhCga2saj lF83EgBxc1edK6hVDoVThNs5HJOKgSZJeHJHi6tUSspSOOFrxUT4CTGojafZZpKL AqFT9DrNL8Pur+rPERFiV9s63CfEVI0khApj7fMgHkZsPVAFOfqiDL76EdWSCZnP D0V9tVYL/iJkQ6dji2zMq4Q/NI33VGEQXmN5Vvmxb52p6HdmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784821958; x=1784908358; bh=OQNX2NfvnfJxBpndSOaFobgsEh4H8cUsk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BP2g X-ME-Proxy: Feedback-ID: i559e4809:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jul 2026 11:52:36 -0400 (EDT) From: Alice Mikityanska To: Paolo Abeni , Jakub Kicinski , "Michael S. Tsirkin" , Jason Wang Cc: Eric Dumazet , "David S. Miller" , Simon Horman , Xuan Zhuo , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , HanQuan , Hyunwoo Kim , Sabrina Dubroca , Jason Xing , Kuniyuki Iwashima , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Sebastian Andrzej Siewior , Jiayuan Chen , netdev@vger.kernel.org, Alice Mikityanska Subject: [PATCH net-next 0/3] Guard against gso_segs overflows Date: Thu, 23 Jul 2026 18:51:42 +0300 Message-ID: <20260723155145.158572-1-alice.kernel@fastmail.im> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Alice Mikityanska This series is a follow-up on the discussion: https://lore.kernel.org/netdev/CAD0BsJWzSr2zduf5v3mVC4zd=Lj6ZAoC+V42-VBdg42aDY8XXw@mail.gmail.com/T/#m1e22fca273c36cc8844e516505d3251cc1418fea skb_segment is patched to avoid possible overflows in partial GSO. The possible sources of too many GSO segments are also addressed: - virtio-net blocks large packets (>64k) with extremely small (<8) gso_size. - GRO aggregation checks the number of segments before extending the chain. Feel free to drop patch 1 if you feel that patches 2 and 3 address all possible cases, and extra robustness in skb_segment is not needed. Alice Mikityanska (3): net: Guard for gso_segs overflow in skb_segment virtio-net: Block malformed packets that overflow gso_segs net: Limit to GSO_MAX_SEGS in skb_gro_receive include/linux/virtio_net.h | 4 ++++ net/core/gro.c | 3 +++ net/core/skbuff.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) -- 2.55.0