Article View: linux.kernel.netdev
Article #9531[PATCH] net: wwan: iosm: fix potential skb leak in MUX DL decode
From: Fang Xieyan
Date: Mon, 02 Nov 2026 08:19
Date: Mon, 02 Nov 2026 08:19
33 lines
9473 bytes
9473 bytes
ipc_mux_dl_decode() owns the received skb and frees it after
decoding. However, the early return when skb->data is NULL
bypasses the skb cleanup.
Free the skb through ipc_pcie_kfree_skb() before returning
to ensure that both the DMA mapping and skb are released.
Fixes: 3670970dd8c6 ("net: iosm: shared memory IPC interface")
Reviewed-by: Guanglei Zhu <zhugl3@xiaopeng.com>
Signed-off-by: Fang Xieyan <fangxy@xiaopeng.com>
---
drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
index 0bbd41263cc2..61700688eac9 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
@@ -693,8 +693,10 @@ void ipc_mux_dl_decode(struct iosm_mux *ipc_mux, struct sk_buff *skb)
{
u32 signature;
- if (!skb->data)
+ if (!skb->data) {
+ ipc_pcie_kfree_skb(ipc_mux->pcie, skb);
return;
+ }
/* Decode the MUX header type. */
signature = le32_to_cpup((__le32 *)skb->data);
--
2.50.1
Technical Details
Message-ID:
<20261102081920.50288-1-fangxy@xiaopeng.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-354530-linux-kernel-netdev=dewy.ruShow 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-354530-linux-kernel-netdev=dewy.ru
From: fangxy@xiaopeng.com (Fang Xieyan)
Newsgroups: linux.kernel.netdev
Subject: [PATCH] net: wwan: iosm: fix potential skb leak in MUX DL decode
Date: Mon, 2 Nov 2026 16:19:20 +0800
Organization: Usenet Network
Message-ID: <20261102081920.50288-1-fangxy@xiaopeng.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2880594"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:QnmevnsKqaRuoS8LvGBqgTvkHX4= sha256:OjFPoChgNGEGXUAOupryek41dAoNlhKJrTDwxf0gHm8=
sha1:84fM5T3VFdDmAd6QLlOiyUSQoGE= sha256:lh7bHuRXTh1fglVcq7vHZUIL25+88loUK4swXOSHeKM=
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 E8EB6112465; Mon, 2 Nov 2026 11:23:53 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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, UNPARSEABLE_RELAY=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=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 GLUapFy9vvY6;
Mon, 2 Nov 2026 11:23:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-354530-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id ADDDB112453; Mon, 2 Nov 2026 11:23:41 +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 0462D30986; Mon, 2 Nov 2026 08:19:40 +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=1793607579;
b=nZOvbqHkq9czOSDmcCZqiihzQf8CORmXmJ9Ext7q4WpX8Es/4WC27g4X4JbB+B9BNvbk
NVjP3etAvDEHnworYBNWsc+QjBYQ9jZZDAgSHo4n9vuCzLk1PbjKi2b2uGW0GkFDBZutq
I/JIrIkNC7TqWWk3+COaDEnGQdjl7VCAwsSYNTFlN4ecWZmWvvOnJpKAMTwa/999sxMku
kQqMMzXcQ9NAWS9eIOxJPrN+OXswOCVv2FI2UrgOET3h//vNiLE3Kk4O/RBPFhW4fybTa
A97KiditoaoUptYCQeUOp0adWkAwMQKZiY544iSFzB1Xn342pvtBqhXSHLs4GrKc0pg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793607579;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
X-Alimail-AntiSpam:Received: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=AFkBQiMpQlhW84bwcrPZ9udkYJ4gGU/LT5A6u2zeaHA=;
b=ShKum995YKb9So+l0hcrq8KOlmhkK1RB6ZHQz49DkOSFCkqcb5s7e8ItFfYogWy+gSKr
gA6TzhxXauT0OJUzgkqvjPCGq49HeImNIN4MIB3+TlakwxndFIFQNT+K/SNGJqm/TCRnW
v5zoZK0j9bA/wBCG6AuOITsCoP4KEdzDvW7wY1Rdg57xoAcWeRKYoMLy+GSuHnEp8IDXz
xudXDniVZxGLdIAJQvrBccIyu1jCoKELTlNjbqjzt4QCNn2BBkWCPcJE9KmPmYfzgcbAC
xklq7OzFwmPXAjrgREMeHkw1QVZy1R070QHjG5QhcfpifmGVP3w/t4jQew9xnLEfTuA==
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=nCYulSUK;
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 CFA53606A330;
Mon, 2 Nov 2026 08:19:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key, unprotected) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=nCYulSUK
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.73
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793607573;
b=156ojIlJBw7iL/SKsCTZ09SMnjQe1evqbbpSGSQ6sw/GDhHa+LINPJA++ja8A/8L737l
hGcSsgoWnAboGtHtKt9kTHtCSYF9zl2dGGVgW5SQuaS4zYml520GVONUqBoPeQmAj8cOy
j5spsrkAoxuiZTrkdhmcOM2Ne2iVov1aT4T5VxWG2ApmJ1zUKgO6OjeFG2e1cuMUpfhbf
DWqhw3TzK/9Oq7pK/1PNhdWuFlBGI/SI4WMW6exi1Crfqmf0oRa1rnkb8KXHvY2vOpcZF
Ek3+QXSjgqXW55n4TiAouezN4P47fPu76FtHBel8dfgJ+bDB0BI4QXtoG8+49yDZhKg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793607573;
h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc:
Subject:Date:Message-ID:X-Mailer:MIME-Version:
Content-Transfer-Encoding;
bh=AFkBQiMpQlhW84bwcrPZ9udkYJ4gGU/LT5A6u2zeaHA=;
b=C43z2l2eiJuxg9HRayFFOMu4Rztz4DMl7BDvM+i5EwOHpJBBG9peUqfDfwSJZLN1vHmT
1gZA/EqafV7+IQs8UlQ8YNMZ4S9A1CMMBA6jWR1SQ8hloBVVFCLIdwE44nZnRbDObZ7b2
DzRlq3pApjy9jq0HtEZlBm8UpBX5fw0h2hqvVbk13P/c6eqek8XDQ9NGgOLTU6Z4mL2O8
dWtI6zCXBBzrPkNKqFE6WbjdnH0DRhiJWT/yus9iGT9WsY9iTET7WmGdHGFhFoyc7qC49
42E8/ATvPEZTSemCJQ0r9nWcywqREEOiZw2YZ1DQCEZ28Yb2pCbJouw+SlvkTYqWI2w==
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=nCYulSUK;
arc=none smtp.remote-ip=115.124.28.73
X-Received: from out28-73.mail.aliyun.com (out28-73.mail.aliyun.com [115.124.28.73])
(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 89B4C606A334;
Mon, 2 Nov 2026 08:19:31 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 89B4C606A334
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=1793607563; h=From:To:Subject:Date:Message-ID:MIME-Version;
bh=AFkBQiMpQlhW84bwcrPZ9udkYJ4gGU/LT5A6u2zeaHA=;
b=nCYulSUK1NSP2oXlOT3cfAcHIsXMFkaMtSoY1euNDfCAbGdPE0ZM2ewjKg+8IxvWcQlWWHmW/5EmxtjCc/n5OlbpBPrnqQGyTSAilQ8/7ld6g3Ri6iQYeJk/5SvzaeFOkljdTRI4wMPsZIp5ErUxxOh5nyaNux6adBWQ+zIDq64=
X-Alimail-AntiSpam: AC=CONTINUE;BC=0.114431|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0497418-0.000651247-0.949607;FP=5497953585913824900|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033037026024;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=12;RT=12;SR=0;TI=SMTPD_---.juoIh3N_1793607560;
X-Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.juoIh3N_1793607560 cluster:ay29)
by smtp.aliyun-inc.com;
Mon, 02 Nov 2026 16:19:22 +0800
X-Cc: 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>,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>,
M Chetan Kumar <m.chetan.kumar@intel.com>,
Guanglei Zhu <zhugl3@xiaopeng.com>
X-Mailer: git-send-email 2.50.1
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