Article View: linux.kernel.netdev
Article #19085Re: [PATCH net] net: wwan: t7xx: validate PIT data offset before skb_reserve
From: Fang Xieyan
Date: Thu, 19 Nov 2026 09:59
Date: Thu, 19 Nov 2026 09:59
44 lines
10459 bytes
10459 bytes
The issue was found during a security review of the t7xx driver's device-supplied input paths, assisted by the Hawkeye agent (LLM-based code analysis). It has now been reproduced with a fault-injection harness in a KASAN-enabled QEMU guest. No t7xx hardware is available, so the harness synthesizes a malformed PIT and calls t7xx_dpmaif_set_data_to_skb() directly; this is a synthetic trigger, not a natural one. With a PIT data address 128 bytes below the BAT DMA base, the int offset becomes -128. The existing tail+length check passes because the unsigned tail wraps, skb_reserve() then moves skb->data 64 bytes before skb->head, and reading the payload triggers: BUG: KASAN: slab-out-of-bounds in t7xx15_harness_run+0xa4f/0xda0 [mtk_t7xx] Read of size 1 at addr ff11000002095340 by task insmod/67 Call Trace: <TASK> dump_stack_lvl+0x55/0x70 print_report+0x10d/0x5d0 kasan_report+0x96/0xd0 t7xx15_harness_run+0xa4f/0xda0 [mtk_t7xx] t7xx_pci_init+0x9/0xff0 [mtk_t7xx] do_one_initcall+0x84/0x350 do_init_module+0x29d/0x800 load_module+0x510c/0x6630 init_module_from_file+0x15d/0x180 idempotent_init_module+0x320/0x670 __x64_sys_finit_module+0xbd/0x120 do_syscall_64+0xee/0x500 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> The buggy address belongs to the object at ff11000002095040 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 64 bytes to the right of allocated 704-byte region [ff11000002095040, ff11000002095300) The read address matches the corrupted skb->data (skb->head - 64). A second case, where the u64 address difference narrows to a small positive int, is also accepted by the unpatched code. With this patch applied, both inputs are rejected with -ENOBUFS and no KASAN report is produced.
Technical Details
Message-ID:
<20261119095933.41076-1-fangxy@xiaopeng.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366924-linux-kernel-netdev=dewy.ruReferences:
<179506943682.3291.10326179398413921657@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366924-linux-kernel-netdev=dewy.ru
From: fangxy@xiaopeng.com (Fang Xieyan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: wwan: t7xx: validate PIT data offset before skb_reserve
Date: Thu, 19 Nov 2026 17:59:33 +0800
Organization: Usenet Network
Message-ID: <20261119095933.41076-1-fangxy@xiaopeng.com>
References: <179506943682.3291.10326179398413921657@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2843760"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nyGshu05Fa7LBaxdKYFLUQwbKjs= sha256:VqWXDVewXdUdnkDkkeMzxe2CqBHvCMzBxldke8V8gsc=
sha1:E0KTRqbyR2iWY9BR9Ufqxcz2PVE= sha256:hJkVHzkEGtIjizU32Np2hvsxZ9a3ANh4scFxEdaaKEU=
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 7658B1155A6; Thu, 19 Nov 2026 13:00:10 +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.249,
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 kESePdNaeOfF;
Thu, 19 Nov 2026 13:00:07 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366924-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 EF51711559A; Thu, 19 Nov 2026 12:59:57 +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 77BAB1C8BF3; Thu, 19 Nov 2026 09:59:54 +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=1795082391;
b=RiwKRJ7GtJ6iU8AWXesCn753KZwhHyYNQeDDuPZoEPyrCzSzo6mHVXgwbRhbx5upUbqF
X+Vb9rvMSiMGhTuKCbZcQoZ4uxqObnyId7I5/kt6W3kXbBBOeo5L5RF2RvG/R12rNglv+
DCG5og48e8KYWlQnYphBMg5nHYoiNN2mAp+PKj1zwoULjrPXDIvBDlqah2HPxiQPHO4q9
Z4QcZOPc/8PT+muNUzdT5Na34gItjmf4rp59Fh42q1ySpwX0piz2KXDgPzRWKvSUwlzoK
kp5t5dgkX8+an07tP5ZRPhy19h46OhjQLTceCr9UrRDclhroNUUXz+0/Lwcb1GPJy7g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795082391;
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=40XBrj6ej0YXePVzHhKmtc1I2QrMmp0ldPmTPQTm2Hs=;
b=sP/9C2vw7+VMwIqkXqeosHVtPun+h31Q2H+SBnAOjbCO12PPUaH88Dpr7G3VYcyFatWM
o62x3LaTl7S8v9veeFpgHyLjH5vDn0LWhNcCsCqBshBeNNY+nOwNv8cP+CsObprMuSS1t
t0M8R8X2tyCjgxTv1ViL0+lsgcs1ESERN5BBS6xwnxgOsA3IgjpMjdNPtuk49/gvhW2y8
8LuA/AxPc2e7hgvT+pN72Kl4WUGrDU80OYFKUOjkcte8jEuY/r816GvyCMRgbIQrFLD2t
DbhmqO2Sq3A4RVPkCaL7ktprGKBwvA/p7McljabkSWS5iacB8ZmDcXU3TfMNVEeqb6Q==
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=sAICyc07;
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 D699060A2602;
Thu, 19 Nov 2026 09:59:51 +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=sAICyc07
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=1795082391;
b=m/Z6brzJyY40ITuFh2/IV0w76FS9on5ixXQU2JlK/jRw9HBbaDvWDMXywN/V7IA0fkqm
SPrTbyBiNsf9BUjyhiZlAU2VKG845n3qYkT8DHvHyQObK7Pd4O1j2jHpXBguoUDquhl9N
+t05AZK5Kb43CenpcvHrxHV8cvaJ1alBIJ/zuwHQrlqZKXf4AjpB2MhGLemuA7+S5h7DE
/r4GO7rC2AcYUfWtaNPopY1OMt5BB0v4xUcD+fJXzudEWF04HWi7LMvfq8t4dVTFFIUim
WI9Mai0SogEdTzsBmE0+kWXorFLTHqfEhX+TpbEWrlXZy/WFPS//k7Z67/FyalIW6kg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795082391;
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=40XBrj6ej0YXePVzHhKmtc1I2QrMmp0ldPmTPQTm2Hs=;
b=P/2qPQcsuFdO4Y7kUxEkCl8yq47n7c/VxJUzTjRlS8HA1A40uD/FKmSfjoPSGfpODHRw
P0GHSOvIl1fW9DIjPGT+dMKYw8y/cVgzGsfpnXSQ/LA9dOVGobd9geoACGtSmnKPZO+sE
H35bwWG7hyLFuC5KmSipPDfrOs2aZAsuOwnB5syLGJdvpAPtmyBrCLN01bED/xkDPCqPb
YZO0rBLSN4kdCEJAyNbFolqWviQnFiVYDPfh/+f8txyM/NhaZBU6ksHlg7gK3i9Y3YqWL
0KLJgcx1LT/q9UL4mNT66uHegirudTkPhp7OTXR6uvWQJlWQWrU+SqvsPHn+QdB4lvg==
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=sAICyc07;
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 3BDF0606A324;
Thu, 19 Nov 2026 09:59:48 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3BDF0606A324
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=1795082381; h=From:To:Subject:Date:Message-ID:MIME-Version;
bh=40XBrj6ej0YXePVzHhKmtc1I2QrMmp0ldPmTPQTm2Hs=;
b=sAICyc077UcTCUAaLmgiJ/iGYd8G03i7MunfiPiQRtnA4f7wj7PRXe5fxPPpkSM+jqHbNQ8TCltKT9Uz++yl/WddoQ67XsYaCfA+a5WKy1/oH2iebi7sSSEog1w4LmZwiovRi1CAbhfezmH0XD2xKpHPS3Fj0QzLtwnlCQGhSL8=
X-Alimail-AntiSpam: AC=CONTINUE;BC=0.04792612|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.00993389-0.000208522-0.989858;FP=16627843036400666137|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033025068124;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=17;RT=17;SR=0;TI=SMTPD_---.k5ij0aX_1795082378;
X-Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.k5ij0aX_1795082378 cluster:ay29)
by smtp.aliyun-inc.com;
Thu, 19 Nov 2026 17:59:39 +0800
X-Cc: fangxy@xiaopeng.com,
chandrashekar.devegowda@intel.com,
loic.poulain@oss.qualcomm.com,
ryazanov.s.a@gmail.com,
ilpo.jarvinen@linux.intel.com,
netdev@vger.kernel.org,
haijun.liu@mediatek.com,
johannes@sipsolutions.net,
andrew+netdev@lunn.ch,
davem@davemloft.net,
edumazet@kernel.org,
kuba@kernel.org,
pabeni@redhat.com,
linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
linqj@xiaopeng.com
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <179506943682.3291.10326179398413921657@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