🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7899

Re: [PATCH net 10/10] batman-adv: tt: limit local table to single TVLV response size

#7899
From: Sven Eckelmann
Date: Tue, 27 Oct 2026 12:35
71 lines
10976 bytes
--nextPart15872503.tv2OnDr8pf
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Sven Eckelmann <sven@narfation.org>
To: sw@simonwunderlich.de, netdev-bot+sashiko@kernel.org
Date: Tue, 27 Oct 2026 13:35:33 +0100
Message-ID: <2934231.BEx9A2HvPv@ripper>
In-Reply-To: <179309132480.3134.3568656714789779480@kernel.org>
MIME-Version: 1.0

On Tuesday, 27 October 2026 09:55:24 CET netdev-bot+sashiko@kernel.org wrote:
> [Severity: Low]
> 
> Does this Fixes: tag point at the commit that introduced the problem?
> 
> 85fb027f611b removed a check from batadv_tt_local_create() that already
> limited the table by packet_size_max only:
> 
> -       /* Ignore the client if we cannot send it in a full table response. 
*/
> -       table_size = batadv_tt_local_table_transmit_size(bat_priv);
> -       table_size += batadv_tt_len(1);
> -       packet_size_max = READ_ONCE(bat_priv->packet_size_max);
> -       if (table_size > packet_size_max) {
> 
> That older check had no cap at the 16-bit tvlv_len either. So the missing
> limit seems to predate 85fb027f611b.
> 
> Blame on the parent of 85fb027f611b points at defa87f5ce75fe
> ("batman-adv: tt: extract allocation of new local entries"). That commit
> only moved this code, so the check is older still. The original commit
> was not identified.
> 
> Kernels without 85fb027f611b can still let the local table grow past what
> one unicast TVLV full table response can carry. This happens with
> fragmentation disabled and a hard interface MTU above
> sizeof(struct batadv_unicast_tvlv_packet) + U16_MAX. In that case,
> batadv_tt_prepare_tvlv_local_data() hits its check_add_overflow() path and
> returns 0, so no response is sent.
> 
> With the current tag, stable tooling would only pick this fix for trees
> that contain 85fb027f611b. Could the tag name the commit that first added
> the packet_size_max-only check? Or could the commit message say that
> older trees are affected too?
> 

The code only does it job partially after this commit. All of the previous 
commits would need a big revamp of the TT code - which is not backport-able 
via stable.

The really relevant part is in batadv_tt_local_reserve() and this was only 
introduced with this specific commit. And only for this commit, Sashiko 
pointed this out.

Regards,
	Sven
--nextPart15872503.tv2OnDr8pf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCauCalQAKCRBND3cr0xT1
y8TcAQDjHcUwP2NnzQWPSyWeev4w3Dn2s9iUlhfIyglDNphWaQEApfjfe4DbHT5L
NYy4eR55gRf5HWQ8hcEEXHkCgWA/rwc=
=XFF3
-----END PGP SIGNATURE-----

--nextPart15872503.tv2OnDr8pf--
Technical Details
Message-ID: <2934231.BEx9A2HvPv@ripper>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352430-linux-kernel-netdev=dewy.ru
References: <20261026085309.1074911-11-sw@simonwunderlich.de> <179309132480.3134.3568656714789779480@kernel.org>

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-352430-linux-kernel-netdev=dewy.ru
From: sven@narfation.org (Sven Eckelmann)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 10/10] batman-adv: tt: limit local table to single TVLV
 response size
Date: Tue, 27 Oct 2026 13:35:33 +0100
Organization: Usenet Network
Message-ID: <2934231.BEx9A2HvPv@ripper>
References: <20261026085309.1074911-11-sw@simonwunderlich.de>
 <179309132480.3134.3568656714789779480@kernel.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart15872503.tv2OnDr8pf";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
Injection-Info: usenet.network;
	logging-data="1536306"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:cK8M3CqBRloWYv/Rh6MAYAYvPAA= sha256:wBJ3PehowtpBpl3M6ktdFxTfdJqXM/gKhzLZ5ern5ig=
	sha1:7z+fN0pbMq77trTzDP5uVjy7Nj8= sha256:ogXKJu0EI/6A+A+SvjB/G3+Ga4qGe2WID0ldgr3IrQM=
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 BB003125BFB; Tue, 27 Oct 2026 15:43:03 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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,
	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=narfation.org
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 McIAEjts--fp;
	Tue, 27 Oct 2026 15:42:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352430-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=narfation.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 3E900125BF9; Tue, 27 Oct 2026 15:42:46 +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 F3BDB2E2A8; Tue, 27 Oct 2026 12:36:15 +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=1793104545;
	b=GY46msY+c1Gz89Qu9s4vBvMzbMUm9CNep9/ylOazFFbxLlrW17SjW2XoLcHXZE5h4t1W
	 WnbytozXG4z5Df3Y8pvsNoAbDWhwOWe2yXgFNdLmaEYPdvUE7EZfvA2RVI+0iIvb30UpX
	 HmhWa29uMyj7j694CCstU8D582Z4psWXtW8knrUlEqmQ5/NT8h/y8UOJ2Bh0oZjY4iQDh
	 ouMIQmX/k0yXY6mI5532UqA/n61WO5UgzDpiNzqpbT1LhhUQdc1byJClMOgJVKrvHl1DU
	 3vXXpJcYM1mw6cbGlL3YLkJRWhqADt+ChdIoc/nEuUKXARqLr7lk6VCelQzVfh5hKgg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793104545;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:In-Reply-To:References:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type;
	bh=K+i0Ir8NB1/YA/OFJN2Vo6ahQORxDCkTkkHvWg7tAU0=;
	b=ecB1mBV6G0jV3yuAjI9aDDySowCpgMxqco60XqoEqkjZ8Amelyl3AD8cddwIMxGmK3pU
	 HVU+GRvTDoBG6jd5lsbJlqZGioiM+tFU35MslEUCfvRJjeP6gYdh3FnZSRrdYLZEm1lfK
	 cAbpujP9QKk/6xHbTZqhWyrxsJ0MUx1D/AXv4liobhvzYwYWVrEkjuchvuTeN6OvAoF0/
	 NMlt831Xd2kLSdU6PEtsaSlekME7E1xbPNGedfFT3ZS50sxDOQNCToWqooPO7FyeO/VjR
	 +NnNPBFmuc4ERyRecwxrQ3fU/Ms71FjZYOojdIRaAIT56alikLV1JbP49p8Df+qCs9w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=VALFiym6;
	dmarc=pass header.from=narfation.org;
	spf=pass smtp.mailfrom=narfation.org;
	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 8368960A2634;
	Tue, 27 Oct 2026 12:35:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=VALFiym6
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.160.73.56
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793104544;
	b=HEzqjeWT90vKDN5vKNK0d1i21WBLTfor0D4DuFVQ7xxcoSIOHoOUKt/2951xQkdYp1Sn
	 sn1LbE4U88uB/vrs9U1emJKkeTjIo6lhJBw16Vvrb8OlCCG3UdCsHFXIFFkjN/sEVsGDS
	 5h1Ds88wt89PQ7/8fu7ZN3j3K2eW60wgNcpIOU6lWwjKZRo5T2eO6RmvHJAd+nADZaVJj
	 cZeMWq7fgAxuqhYqt5pDIrijGqvMwIQXgxQtIuA6Uy9LtOJcT64OUvK+om22VmAYBewY2
	 7WVxRXz3+St5B6XMiypzTlacWhxv+8ME1YaOCTOI+g81z7YBKXOsAHByY3rcMwiYRtA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793104544;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:In-Reply-To:References:MIME-Version:Content-Type;
	bh=K+i0Ir8NB1/YA/OFJN2Vo6ahQORxDCkTkkHvWg7tAU0=;
	b=FZnL/r9P7YHUrT1SclzP156rNICVWZIVwWptShWmZiue78aZ99cV+iWRoMWszZJQXOPB
	 cBP/q3BH7u9ZeuxLPPXugZFZx/qNOint40S6Wu9+GEHJAr65FBNY4hpvJCOhRDGRciW+A
	 Qf2IPEA6UkOyBghqduwesdD1XBtE6vZb1hzA9fZElYEnuT6qSv4xn+0t/TNlGDmjmcttX
	 2a6DBCFqy8RmU0R4F3GN8oHSOFmDOOs7izr923N6Q/6WmkIajldj5xkVVu1PZ6RG28xJG
	 6Q4GenFQyjZnDy68mPERuyTUX8gAJcn9LqcuFPRkQ/0XrlLqfDsDubgwf6XXRe/AZOA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=narfation.org;
	spf=pass smtp.mailfrom=narfation.org;
	dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=VALFiym6;
	arc=none smtp.remote-ip=213.160.73.56
X-Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ED50606A31F
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 12:35:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2ED50606A31F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=narfation.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=narfation.org
X-Received: by dvalin.narfation.org (Postfix) id 4D1BC20581;
	Tue, 27 Oct 2026 12:35:41 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org;
	s=20121; t=1793104541;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=K+i0Ir8NB1/YA/OFJN2Vo6ahQORxDCkTkkHvWg7tAU0=;
	b=VALFiym6jC5QNhPgDk4uS8ZY59hMZJ7Y3BaVeeQLQ+tqQ+aFB/nJ7xK6D9+QPm2+BiZzty
	zC+PDPCI02H57dC5vhI07HwiQEDnlVqGftt/cQPdln0yCyDk32s3GYGrlbO57Nu0mMJuMt
	HJ+Xvgohx9RfqAQ6kEDMD8S7W3hFRZk=
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
 kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 b.a.t.m.a.n@lists.open-mesh.org, sashiko-bot@kernel.org
X-In-Reply-To: <179309132480.3134.3568656714789779480@kernel.org>
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