🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6748

[PATCH net 0/5] net: fix misc signed overflows caused by bad sysctl values

#6748
From: Jiayuan Chen
Date: Fri, 23 Oct 2026 09:13
26 lines
9599 bytes
Recently I have reviewed quite a few fixes for variable overflows caused
by config values, i.e. a value set from sysctl, module params or netlink
that is accepted as valid but later overflows when it is used in a
calculation. I believe there are more of these still out there, so I
used an LLM to dig through the code and it found the issues fixed in
this series.

All of them have been reproduced and verified in QEMU.

Jiayuan Chen (5):
  ipv6: restrict gc_elasticity to 31
  ipv4: fix shift-out-of-bounds in ip_rt_send_redirect()
  ipv6: restrict mld_qrv to 255
  ipv4: restrict igmp_qrv to 255
  net: restrict message_cost and message_burst to non-negative values

 net/core/sysctl_net_core.c | 21 +++++++++++++++++++--
 net/ipv4/route.c           |  7 ++++---
 net/ipv4/sysctl_net_ipv4.c |  4 +++-
 net/ipv6/route.c           |  6 +++++-
 net/ipv6/sysctl_net_ipv6.c |  4 +++-
 5 files changed, 34 insertions(+), 8 deletions(-)

-- 
2.43.0
Technical Details
Message-ID: <20261023091419.167088-1-jiayuan.chen@linux.dev>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350991-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350991-linux-kernel-netdev=dewy.ru
From: jiayuan.chen@linux.dev (Jiayuan Chen)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/5] net: fix misc signed overflows caused by bad sysctl values
Date: Fri, 23 Oct 2026 17:13:26 +0800
Organization: Usenet Network
Message-ID: <20261023091419.167088-1-jiayuan.chen@linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="459379"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NLQ2eHE5x9k7q9JNS3QlPM/s/Jg= sha256:bZz5/eCk2O+nIFU0i1p6kcOzgJwbmJYYaeZLikQmrt0=
	sha1:jQETTw2rk6+mWFv/Px4We14h9Ug= sha256:NTrt1dtVgyzmrnhISGadAAnvk/CElLJC/Y/A6KoHRuo=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id C835111144A; Fri, 23 Oct 2026 12:15:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.05
X-Spam-Status: No, score=-2.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	HK_RANDOM_FROM=0.999, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Mkl90noVyQRF;
	Fri, 23 Oct 2026 12:15:00 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350991-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id F2A5F11144C; Fri, 23 Oct 2026 12:14:50 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 81C0B2F9CA; Fri, 23 Oct 2026 09:14:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792746881;
	b=j7DD3PQsFsAlbLJrhjPB0JkJKO8dwgGu6WG8lD3751tTT0KDl8DrY6padtN7T0GyDvjm
	 THIWZAQxRKLPCaRG69y6QvRux1A3DCnEIb2t7HCvdk6bSRgGFdFdfopM2F/Xd5uJclvtx
	 1LrwyjcmPLOg1wzULdAONgXIOr4KJ42jDh4tYN832WGQFwr/CSc18LAOx2a+w2shNe5Lb
	 v+EEtOiMi/W1nRWfICKWQVaYqsu79hMVJ8Q7jstdy3ZgpLc2nI8okSiZEdZjPLomz6/qS
	 iGjCKT9PZSgbfXW1vO8eplOEYsUPtvUYYneDMzNm3w1DviXD1BVuPvR73kwZD8a0QSQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792746881;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding;
	bh=4zAc3he/vCh5XQJ3xmbFTBFKdpkOc7QTrO/peAQSjfo=;
	b=zj0/pOUEc3vYrvnrwIT+LQOQKqqNucydfMhV3m2idZZuFq5EpTN8MjTW+63JRL4eP9IE
	 xVag1BTyzJETpHPUm/pfP6hKBaSLChRYSU09e2TvgeSBgbQ8wcKhwcvUloFAerNJ5ygS5
	 TLbQ+FagHOMSrkW6g37UTmAdIJFutRgoiHi9j0Q2dR/7sm8h2Byo+Yxce+HqrRpfSpPxW
	 5Rz+bKhKnNQxw4VvobIuOsFW6ANRHlnMmDPZBNaqpQVTYWZwcr9AUkwUNQmTOi7J2boPZ
	 6caWRsvIxjfX9bn+2iEcJ0rZCpXTpV6pl9RDyIFvX+yLE7gJ7XrIm4tO+4dDCCDgP0g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FvmHYpW9;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FA54606A334;
	Fri, 23 Oct 2026 09:14:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FvmHYpW9
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.227
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792746880;
	b=qD5QW2dLX/gyQeSXHSMPhQUHrGsqNx2x6pphf23aazi3Y+3fPz0/Hy+LwWTEB79yFwHv
	 iCoJbgdKn8POCdWpUmkpfT81ks0fl7AR8+lnL2ElquDPXhuak08VtFoQdxkkomcgzx12e
	 5OrVm3IFhqqbv5RB4cVIYXlbKrYBANNTmuDqumDTns8XWmJAIbByUYwJueR6+tQyucsg3
	 QeIBvVUhECmxgV/Pn/2Fje8ATFfKbBDJatp9HJuxkbBuNRcy2X4g8V6d5Yl33Mc7m+4Ey
	 NdLkBX5sI0bbNOXU5Cr2orDD4e4oHjbhu5U1rEWmZkYlZOJOi2AGWYPKP+GheIPuftA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792746880;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=4zAc3he/vCh5XQJ3xmbFTBFKdpkOc7QTrO/peAQSjfo=;
	b=5DSgybc4cfw/mtrZNawCrvAd9ZejWXlsbed4wYu/pexWz6b7GiK9yHxaLWPTUnwE0nH2
	 PvdAI79oS+fcKiaKfCKJQ2A1L+2MAfhVpyRZBIlw+Gt5KU3ivf3scPev6wDqKRpTQZ3GD
	 ma6RWXRI7Z/gGn9SCeWYMdjvbJlaPxruHRtvmf6uhd/W5HnxJvvzTnFjmp8sA8E24cyVd
	 7cGsAtWo2zRW6nDavN7tJDDBOn5C7aQYhR4IdpWCyEYvRYyLI+KOhPnjFa7cOOOyo4LYI
	 VwpF3qUCcY8zCiGVKPWFy7BAwsDlp54GLGFi2TuEviiSQ2qhyMI2SPI9wndFYAtcQBg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FvmHYpW9;
	arc=none smtp.remote-ip=91.218.175.227
X-Received: from mta0.migadu.com (out-227.mta0.migadu.com [91.218.175.227])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 799B8606A32D
	for <netdev@vger.kernel.org>; Fri, 23 Oct 2026 09:14:39 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 799B8606A32D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=bCF8cbR3CbPnLMlPgvVa1/bBaRcT7OGjsLq3olXXh6Q=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1792746877; v=1; x=1793351677;
 b=FvmHYpW9aue5DDkI54G1xWxUCkzbbIfriTbxvh0qPAEbJunpYQD84yBr9kqdtmFDdh3zuNI0
 J+XK4IWtTWqJQof0Yu+ayZL9WCLHQVt/baf1oRKciCg0wgexG+gPkg9pIwAlU2LbvgBIfMyxnrZ
 W08ljWi7vhC66CWhS8XTbEUE=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id 5c5795b909675e0d;
	Fri, 23 Oct 2026 09:14:36 +0000
X-Mizu-Trace-ID: 5c5795b909675e0d
X-Migadu-Flow: FLOW_OUT
X-Cc: Jiayuan Chen <jiayuan.chen@linux.dev>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Joel Granados <joel.granados@kernel.org>,
	Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>,
	Yung Chih Su <yuuchihsu@gmail.com>,
	Wyatt Feng <bronzed_45_vested@icloud.com>,
	Fernando Fernandez Mancera <fmancera@suse.de>,
	Flavio Leitner <fbl@redhat.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Petr Mladek <pmladek@suse.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.43.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list