🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6940

Re: [PATCH net v2 0/2] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids

#6940
From: memoriaru
Date: Fri, 23 Oct 2026 21:03
34 lines
10670 bytes
From: Zhang Hewei <memoriaru@foxmail.com>

Hi,

Same context as the v1 thread, replying here for the v2 series:

Discovery: manual code inspection, while auditing this driver's
handling of device-controlled responses (the MAC table walk and the
BRIDGE_ALLOC reply).

Trigger status: the unbounded-walk mechanism was reproduced in-kernel
-- a self-contained module carrying the verbatim loop shape of
mxl862xx_port_fdb_dump() (device transport stubbed) built against the
official Ubuntu 6.8.0-71 headers and run under QEMU (TCG, unmodified
official vmlinuz) never terminated on its own (100M iterations logged;
a real table holds 4-16k entries). The reproduction is automated in
Docker and needs no special hardware. I do not have access to mxl862xx
hardware, so this exercises the driver-side loop logic, not a real
device.

The BRIDGE_ALLOC validation is logic-level: the driver consumed the
firmware-supplied id with only a transport status check, so the
reserved id 0 (which doubles as the "not allocated" sentinel and the
CPU-port bridge) was accepted verbatim. Whether compliant firmware can
be made to return such values is unknown without hardware; the checks
guard against firmware that breaks the API.

The v2 diffs themselves are small and mechanical and have not been
compile-tested against a full kernel tree (no hardware here); the
reproduction module compiles and runs on the official kernel.

Thanks,
Zhang Hewei
Technical Details
Message-ID: <tencent_A40150C474B4D2DDBAEA56D8B20F03130506@qq.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351239-linux-kernel-netdev=dewy.ru
References: <179278829990.3327.14694215720214654641@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-351239-linux-kernel-netdev=dewy.ru
From: memoriaru@foxmail.com
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 0/2] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids
Date: Sat, 24 Oct 2026 05:03:22 +0800
Organization: Usenet Network
Message-ID: <tencent_A40150C474B4D2DDBAEA56D8B20F03130506@qq.com>
References: <179278829990.3327.14694215720214654641@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="612266"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:RYDzxvJ16SeG/BvDdjPKgzb9nF0= sha256:DVWUjpTzO1NuwfPhnb5Z8jYgsuQEOh0Py0VrD2ZDQvI=
	sha1:8XgHIu1xp/WoTkfXcLbtwt2zyCM= sha256:QiqGD2V0cELKrnSRFAIg8Nzx+PmSWLDJfC9+pggo1N4=
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 A46E2111588; Sat, 24 Oct 2026 00:07:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.047
X-Spam-Status: No, score=-3.047 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, 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=foxmail.com
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 htt72-qiV1JW;
	Sat, 24 Oct 2026 00:07:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351239-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=foxmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8CAAB11155E; Sat, 24 Oct 2026 00:07:25 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CB4A03DC9C; Fri, 23 Oct 2026 21:03:37 +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=1792789417;
	b=wY/n6zu8BEtlXXkh69WetZa6UiABdzkaG4UKy4IFZS/tJuSZyLeS6248eVlGwEfZ2tPq
	 tkv5T2KHSMERCNbu26rWnrn8qMpt5z6B5QdL3q6XK+5tRZCwx8OPn87eyhXXvGdG6GlkN
	 W6msn/erQ86dQbZb7Qx2NJITO9rdBA78nlrsXyO3V36mjzrQkt8lXPZmeSt0r41vG6kKl
	 FA074e9cZEajEvf6WUXNnkcp6L2u5l+qaZsMeGBL/VyL+ImY1KpWxrJBrJ3nRrYehGqPZ
	 +QEraCoiOhy3LMIFaDbRF+um2WGtrQT18woRmsZ9vgplqeSl2vnU15EHcIvrSSXNkYg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792789417;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:
	 Message-ID:X-QQ-XMAILINFO:X-QQ-XMRINFO:From:To:Subject:Date:
	 X-OQ-MSGID:X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=AInmA40ZqY/lMrocMvl4Jq6XnvgXz9DNdeesj0ndxFQ=;
	b=B2bsW1P3qak/5VXShBtu5OXMhoSve6MDZvE1QpIIWbWXsOO+8dXz9SbwHnUnYuP6paLO
	 YuZ/TW4Q2uv5IFbYAFT44l+boYyzZPJGycSL5f9V6zy3WK2IT6IxQAWr4YZCS7uOafyuo
	 kAW7SEm+uU5SmLaDXxCNrDFxnC3nQVUjCCeA+bD9lZB5A8gjG4KSSXXzePUS2+u0pMBIp
	 P33j4fQCXLH9i9Ytr3QKqk7MBHJVvIzAScffmeYMqLt2esj2I3lF85Rl7R8jfBzkxJ1KV
	 lavzImFzyR92MIgE1Qm5E44X/WcGBIC4oMtUceNIsbjVqZzmArwbJWwXtmkrO/DvEnw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=pf19SbFB;
	dmarc=pass header.from=foxmail.com;
	spf=pass smtp.mailfrom=foxmail.com;
	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 14AE7606A320;
	Fri, 23 Oct 2026 21:03:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=pf19SbFB
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=162.62.57.64
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792789410;
	b=vaE2ukwcr4TlfPns4v3O0aQEyZWYvrawGva25Rzzewna7ULedhvqnaAbDZ6vGaD/bz2Q
	 bhJ1dQFC24JWB3g+RcPF/XXuRDx9VqvxBw+FiDt+fUQ4iIJ2pGWUeg9cbjVycpYdRtYdB
	 aTWaa/5PlnN3jwHwMcWLyGyYNt1IV1CGtdE+c/TG2ZDejwJS4g4lV8yyzYOG2agogc+p9
	 PzEEAkjbUmmLvtnf22KM3zLb28hC03gqu6oZ/7LfbBqhaaeZCn3AB/QJxxKF7nBdONUzF
	 fFItKuawIOZGlFV9i1qvjYvrwPDV+kRw/7s6gHLlCN4pgNtH7bEEXSFyVZ0rkozALgA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792789410;
	h=DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:Message-ID:
	 X-QQ-XMAILINFO:X-QQ-XMRINFO:From:To:Subject:Date:X-OQ-MSGID:X-Mailer:
	 In-Reply-To:References:MIME-Version:Content-Transfer-Encoding;
	bh=AInmA40ZqY/lMrocMvl4Jq6XnvgXz9DNdeesj0ndxFQ=;
	b=yavSu1birRDI/xp8/uFEKT+s9w0/hQ/CGmb5bIrygz3t6VG2Q5FIBFGJU26FWFgJQ1rg
	 UpJD+4mgODRpgP5I4ArnNzXoYlXx45bQXorNUMcL4gRIGTzZefmehXMt2p8tQJ5g6kSpA
	 MS7ljNGjEgh+shbB5ch7ZMt2P6FsJNHj+Qk12ThU3A9rwppammtTafXqWRVO5UgdT6uCv
	 idPa7zejM0IX32Oh7mTgBFGBPBJWWiOKUfqYvjd3zUAlgVW3WueZcB5L1HiduEy/uRKy6
	 fwL7NODuxMbOQJIcdwwQFlFii60/QbqBbQaDl/OC3xKOZrblgMmTSbf32NapYAjyMcw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=foxmail.com;
	spf=pass smtp.mailfrom=foxmail.com;
	dkim=pass header.d=foxmail.com header.i=@foxmail.com header.a=rsa-sha256 header.s=s201512 header.b=pf19SbFB;
	arc=none smtp.remote-ip=162.62.57.64
X-Received: from out162-62-57-64.mail.qq.com (out162-62-57-64.mail.qq.com [162.62.57.64])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C610606A31D
	for <netdev@vger.kernel.org>; Fri, 23 Oct 2026 21:03:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6C610606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foxmail.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;
	s=s201512; t=1792789404;
	bh=AInmA40ZqY/lMrocMvl4Jq6XnvgXz9DNdeesj0ndxFQ=;
	h=From:To:Subject:Date:In-Reply-To:References;
	b=pf19SbFBKUAtFSs91VC4qNbpR02Jg1bkxK8aclT5P00bm5SWGx3e6uZMIQNLfOCDE
	 y5IlHBwh1pO0NLgHQGqAxnAMuGCIQpAakQKvc+UG1erX04ta0stmqmEjEcN8UTFwgr
	 Tyrv7G0rGfz336ae1W5hXV5zpLmWtnJvofoJEEhY=
X-Received: from localhost.localdomain ([180.165.29.111])
	by newxmesmtplogicsvrsza73-0.qq.com (NewEsmtp) with SMTP
	id D62EE9E; Sat, 24 Oct 2026 05:03:22 +0800
X-QQ-mid: xmsmtpt1792789402tw7pjqcnd
X-QQ-XMAILINFO: NnYhxYSyuBnLTqtZTgLlM/1VbUnaBIrZ7YXjuHU7+eMQFz5ruNtoeTx7synsNG
	 OsVWSdlDi3pKZPyzM6/YkCc0ixGn8gP20KAK9dfcSRPpUobwXo9syG13pOS6osvJlsDYbFWWfljI
	 ai0NqQuOo40HFBVWSRMkx92P0/ECGQNN6eU8iT8sKgIMEjV7+RwuPlP/Wp/eFJuEz72ju88xgkhg
	 LuzFIc1w/D82374lZ4Z5Uh7Fxo2NNUlpzSnGDTQPUof7qilcKUqtWpAHh7b+d5z8b/E8xGWFRMSv
	 7wLBahdYN/9y6RGoEeKasHCxOzZOGoIURkwLsan5hp58IzWqXrO553O0EH8hTdK6qnFHuWwulztp
	 UkUQilEV8vAM/LYByf79m1zJr8go/YU/eCs+HLE0ax40gGCJIBN51oEorOAW/1gwkAcG/38If0nj
	 G9LFXAQZqmN5YDF5GXfWFM3hiHHAUDBYvHjjNypsTDSLoeEA91ej+or3tO/Urk4vlGIV5XPFUJbf
	 k6XvYzB80p2MsX+DkHAp1JmYDei2CRhb9+IOOA2n2vSqxcBqLTt3DqcDVyEQq7UVQ6BefEXcOIQp
	 Q+e7pnW8/m2C29Fecepm5gvizjSwehWL2B5zEqxXNHWozxtswYwl63oQe5gnIU1FBaI2uSMuqlzn
	 1UhxVrhQ/Qwqmpg+itM5dp+dvB+0x3yCotsUUq3P373NoRVV4DdrMuXY8EfSD77SrEk7frBdU9mK
	 WcyE7fdGsxSpHaUn8I7PJ4fJLS5ljNE8TP1Y0IeipibyyOArVNnVVEXsvx9rBfyGhlQfS2QWWR9Q
	 m3Wot2zwfq1MSAtWkAaCFWb1xOPvrFRemhvbWFg2i9OGmEaIs3ZSJRRbWbXLha37EBG5xKHblR3k
	 I8ZIeUDmEpSUVAsSogCKO/PRt1a/5ssJMuxpEtnk6aInlKKx5GBLUslxQbvlrcMeLNmXd2k9t3si
	 biMjyPj+uJ0WUKCa20Tsz1zt4TnfJfbYN3qze+2ljRigbbpAE7fHpO62K3szf0WnL6iQHBSRuuRN
	 dkB+mMLssQT400mVay9yppBmxAJsk=
X-QQ-XMRINFO: Mp0Kj//9VHAxzExpfF+O8yhSrljjwrznVg==
X-OQ-MSGID: <20261023210322.42971-1-memoriaru@foxmail.com>
X-Mailer: git-send-email 2.39.5 (Apple Git-154)
X-In-Reply-To: <179278829990.3327.14694215720214654641@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