🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17801

Re: [PATCH net 5/5] net: wwan: iosm: validate the command parameter length

#17801
From: Fang Xieyan
Date: Tue, 17 Nov 2026 10:59
31 lines
9871 bytes
On Mon, 16 Nov 2026 13:55:19 +0000, netdev-bot+sashiko@kernel.org wrote:
> [Severity: Medium]
> Can this bound reject MUX Lite commands that were handled before?

Yes. The compatibility branch in ipc_mux_dl_cmds_decode_process() is
there for cmd_len != size (size = 20), and the protocol minimum is 0x10,
so my min_t() dropped the 16..19 range that branch is meant to serve.

v2 will stop using cmd_len as a parameter bound in the lite path and
keep only param_len = skb->len - hdr_len. There is no chain walk here,
one command per skb, and ipc_mux_dl_decode() already rejects a short
CMDH header, so cmd_len buys no safety. It will still be passed to the
decoder unchanged, so the compatibility branch keeps working.

> [Severity: Low]
> This patch has Cc: stable and Fixes: 9413491e20e1. Its context, though,
> depends on the earlier series patch "net: wwan: iosm: pass the DL
> command parameter by pointer", which has neither a Cc: stable nor a
> Fixes: tag.

Correct. v2 will add Fixes: 9413491e20e1 and Cc: stable@vger.kernel.org
to patch 4/5.

The point on 2/5 is also valid. packet_offset equals dl_head_pad_len,
so this is the same empty case mux_dl_process_dg() already rejects with
dl_head_pad_len >= dg_len. v2 will use <=.

Thanks for the review.

pw-bot: cr
Technical Details
Message-ID: <20261117105938.9647-1-fangxy@xiaopeng.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365182-linux-kernel-netdev=dewy.ru
References: <179483731920.3136.4345864455275657786@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365182-linux-kernel-netdev=dewy.ru
From: fangxy@xiaopeng.com (Fang Xieyan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 5/5] net: wwan: iosm: validate the command parameter length
Date: Tue, 17 Nov 2026 18:59:38 +0800
Organization: Usenet Network
Message-ID: <20261117105938.9647-1-fangxy@xiaopeng.com>
References: <179483731920.3136.4345864455275657786@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2309891"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7HC3qyUexcW5w9X2B7GoOw2k/XY= sha256:Xav9B0bEZZcfzn56FrJAvkn6pcuUORzXxbZVU1D7uPY=
	sha1:PLjYd+M5E8yjrWatQLE/hx3yTeI= sha256:TQXOLBMi5BUk64KtVf4jyvsP5B0LSvbYzMfgvlxDNHE=
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 45715114EAB; Tue, 17 Nov 2026 14:00:13 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.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.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=xiaopeng.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 NtL2bzy-2ej7;
	Tue, 17 Nov 2026 14:00:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365182-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 98381114977; Tue, 17 Nov 2026 13:59:54 +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 3A93F2CC48; Tue, 17 Nov 2026 10:59:53 +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=1794913192;
	b=5UVcJ45T6AFp12erNmeRB/Zjo3U+JNYNsCPWdoMO2AVLC/OQVogPsotMIC7B3oTInm1F
	 t28+sz6AmKorkZ/M1AeE3WTetxypx0BvoCpvRgv9M8wgeU5+BkfjkhbG9TYa0lZ7yoMff
	 m/iAL1bPhAAbE+Xi6LXambpkIEC7InSYVEB8FwpciSpjvyj2c6RpqW1fd5IP5lOGhjGQ/
	 BvkBY08mM87B2de3E+mxbqJI815mVWmKZlCW3f04DUiH+mwaleH4uGKOnjX/VQuQeM4Rg
	 vjoHW+YKiX28upKA12QqXQPCQKAjIcXtd3rF2Hnjtoy5FZJRAzaoQz1WrpQonpHv+gA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794913192;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-Alimail-AntiSpam:Received:From:To:Cc:Subject:Date:Message-ID:
	 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=hh/bsSW4jmc4opaTi9RD91uQAj+fh+Nn7GjFv3G6gfM=;
	b=1g7UEFs+7k/4joz3VhMZ/LCELPTjtw1EYfuisozWFTjB3zKiOY5HzQxIHtJTB4Xb+Myj
	 yj800noZhy0QvTBvRtEl+Hz4IFuBSYfIh2RJ/pNyyL7azMfvuQlKZqeoFBBHjt42BzV+f
	 xVV4Wb36ysFH4bGnBRBjeTrKLIB7hVakT2yatZ6Mo1RamTJgD1jjAGP4N6d8MZB78i+vp
	 dBGSYgrB1arDcYXOZKof3bk1U9Y0j7aRqhROpORwzV/sJdYNeejEnhIDDTcG3Sr8YvpvG
	 fkaG71jMjj347zLaAyZvWADVlsiqczManoVdb29zymjNHhpQtuvNesAtTUYSerM+Csg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=nEYj1aKK;
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.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 9A26C606A336;
	Tue, 17 Nov 2026 10:59:52 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=nEYj1aKK
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.123
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794913191;
	b=CY/uot/QdOk+qVgtTyF6kY7VLuwb3XgMR7caeVjR+gm5RndvrreIoGh7KZxnlhxNlE6+
	 AiFbajf7euAgsDHhc5kL90aEdISI91AesjwugRzCmKsd4PvTtcM7vU6sPFO2FTLCxu0Kl
	 MQYvjE3bXcpUo1jc6PyYl9P5eIUraCW/jQ9oMB/00YTOj8jmPdV4ZrDr78P+AZkCufLOs
	 bdhvxTj6oXR8BjZOo1Wr7JurmGmQ2sik9KVsaRmkLG/vKDozpL2sbFJQusO0mMKM0PODP
	 C4qe2hWMOHkdsmVwOtE4KGKgEazL7Kp/qXho6mwkyGNJKrhYFxPPRXXh+Vt2NrTIh8A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794913191;
	h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=hh/bsSW4jmc4opaTi9RD91uQAj+fh+Nn7GjFv3G6gfM=;
	b=nsjRcAEumq0SooDl0C/AaqML8ffTfiXXb5uivt8+YxvVtSH31KS3lv8S5cdkF5jjRPmH
	 /MIasTyh7TYuYxt3JQUlwEcjnX/QULjqQwdr9to0clqhq+RCBnofLrdE9kRYPC6v0Y4r1
	 Ya0N1ryimnwl9LR0txHGNEIk57qrPx5MiDbLRtv/4u+FiY8FEMvZmWu1DsJTOZkZy+Fzw
	 VH/Et8yiK6mt4AE8iSNwQIejzMv4Z6pPosZEMtRA5KCj7hM0Fkp0cmRQ6phrIj5fL5BZN
	 bJCPJ7u3fLZEro30mVgySvbdywQFdfP8q3cBP0ovuUWiKkZz+tigvVpJWMbT2gQMglA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.com;
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=nEYj1aKK;
	arc=none smtp.remote-ip=115.124.28.123
X-Received: from out28-123.mail.aliyun.com (out28-123.mail.aliyun.com [115.124.28.123])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2FA8606A31C;
	Tue, 17 Nov 2026 10:59:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C2FA8606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xiaopeng.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=xiaopeng.com; s=default;
	t=1794913180; h=From:To:Subject:Date:Message-ID:MIME-Version;
	bh=hh/bsSW4jmc4opaTi9RD91uQAj+fh+Nn7GjFv3G6gfM=;
	b=nEYj1aKKFrhCXU1DCb9g74stb0N2Zc56WfJ3cB8k0RhejxWq2ov2yd9Nb0tQNAckHnqsFuIYIfZYNYBpRvuqPqW46a8Thu5+zyTn22YeRtMO8jFBeunHZlm+nV73t0tlnKGBeVVcRe0HxZErYTk1KEDMp6HOGnagwsRHVb67N9c=
X-Alimail-AntiSpam: AC=CONTINUE;BC=0.06199611|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0017656-0.000129412-0.998105;FP=3193649721091749240|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam011083034076;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=14;RT=14;SR=0;TI=SMTPD_---.k4.HSHG_1794913178;
X-Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.k4.HSHG_1794913178 cluster:ay29)
          by smtp.aliyun-inc.com;
          Tue, 17 Nov 2026 18:59:39 +0800
X-Cc: Johannes Berg <johannes@sipsolutions.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org,
	Maoyi Xie <maoyixie.tju@gmail.com>,
	Simon Horman <horms@kernel.org>,
	M Chetan Kumar <m.chetan.kumar@linux.intel.com>,
	Guanglei Zhu <zhugl3@xiaopeng.com>
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <179483731920.3136.4345864455275657786@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