Article View: linux.kernel.netdev
Article #8849[PATCH net v2] hv_netvsc: Stop PPI parsing on invalid metadata
From: Erni Sri Satya Vennela
Date: Fri, 30 Oct 2026 09:34
Date: Fri, 30 Oct 2026 09:34
61 lines
9970 bytes
9970 bytes
rndis_get_ppi() uses continue when a per-packet information entry has an
invalid size or offset, or cannot hold the requested metadata. However,
the remaining length and entry pointer are only updated at the bottom
of the loop. Each error path therefore retries the same invalid entry
indefinitely, repeatedly logging the error and preventing receive
processing from completing.
Return NULL on these validation failures instead of continuing. This
terminates the lookup when malformed metadata is encountered while
preserving the existing behavior for valid entries.
The issue was reported through an internal bug-tracking system and
confirmed by manual code inspection. The pre-fix hang has not been
reproduced locally.
Fixes: 44144185951a ("hv_netvsc: Add validation for untrusted Hyper-V values")
Cc: stable@vger.kernel.org
Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Wei Liu <liuwe@microsoft.com>
---
Changes in v2:
* Add Cc: stable@vger.kernel.org
* Clarify how the issue was reported and confirmed in commit message.
---
drivers/net/hyperv/rndis_filter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 9b6c44979b4e..2c30abf9faf8 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -401,12 +401,12 @@ static inline void *rndis_get_ppi(struct net_device *ndev,
/* Validate ppi_offset and ppi_size */
if (ppi->size > len) {
netdev_err(ndev, "Invalid ppi size: %u\n", ppi->size);
- continue;
+ return NULL;
}
if (ppi->ppi_offset >= ppi->size) {
netdev_err(ndev, "Invalid ppi_offset: %u\n", ppi->ppi_offset);
- continue;
+ return NULL;
}
if (ppi->type == type && ppi->internal == internal) {
@@ -414,7 +414,7 @@ static inline void *rndis_get_ppi(struct net_device *ndev,
if (ppi->size - ppi->ppi_offset < ppi_size) {
netdev_err(ndev, "Invalid ppi: size %u ppi_offset %u\n",
ppi->size, ppi->ppi_offset);
- continue;
+ return NULL;
}
return (void *)((ulong)ppi + ppi->ppi_offset);
}
base-commit: f71ff7d406523748bfb8236830c7eaa6a308aaa1
--
2.34.1
Technical Details
Message-ID:
<20261030093459.4004663-1-ernis@linux.microsoft.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-353688-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-353688-linux-kernel-netdev=dewy.ru From: ernis@linux.microsoft.com (Erni Sri Satya Vennela) Newsgroups: linux.kernel.netdev Subject: [PATCH net v2] hv_netvsc: Stop PPI parsing on invalid metadata Date: Fri, 30 Oct 2026 02:34:59 -0700 Organization: Usenet Network Message-ID: <20261030093459.4004663-1-ernis@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2201416"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:8hnXZh1JKVVGsY0+Asp2UbKldw0= sha256:ZBnOHDnNoNnAZXosTHPAbCIRzGP4w/jfh7A2kuJovlo= sha1:1k5iJ7mqumxExzPEg+38GHgUd/8= sha256:Jt7d6Pc1M390dVW2gpK+W5LEU6Bs2Mw2hhrnU1+LgCY= 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 2064D125C8B; Fri, 30 Oct 2026 12:35:38 +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.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.microsoft.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 KmgmCFyyTNNK; Fri, 30 Oct 2026 12:35:35 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353688-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 8266C125C89; Fri, 30 Oct 2026 12:35: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 D51AE26439; Fri, 30 Oct 2026 09:35:19 +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=1793352919; b=Y4+Er1YgzNWKHaeiD0QcxnpMd7Pa87c8t865DgUo0USXKAZc61CoPPkXuaLZ11SqI2Bo 3aGdYt83hoZX2VeVEE+e1TvCjoupwQF47fykxueY3phW3LPCc7Qh1V8HLI4hFQAGxx3kR dD55dk7javdciGLt+8CoiseB8/X3kdjiKRsb0FdStqRVR7wm1JbR4sZBMnnp5YhNqA8HE FWWn3K2tUQ2V4vw+zLqXhHs/MFkvDe1XOZ+FHNYuyoFPwRgOUXXA+bU7/+QRfuu0sjVHD FMSNJ9InXAdWMSVLpiRRhRiVPKKf7gQ1Tr4/20Vvez9aPmHwsctF8gyr7iRZSGHbo2g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793352919; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Filter: DKIM-Signature: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=a4DxPzJFq+Xx+85XSsmDtCfWeMHzGVT6RmNuzkGCqK0=; b=UUM5Jvy8Mto1mO528uE1wP4ifddCPLUHrBWkSSAjBA3MVC25z0PzYG6NcX4w72e9M8w1 q8pQawUpVQGk//ggN/iGrGoZVTKd508Y0S+UouyOZJssjemtPFMrIxAqGOGnnEJzi2Ii1 WHOb/ksXpCUsTEzdoGCwnvpHWjfztuOgANVONKkUnXaCvf6TzKHpWWuaBd3RPN21+uXEw uctIEkAtXGeBVBLWQoJSvLG5M3Jiv92mxZHtJ74eB7MNTq6Q224LZyF3NL303EEOgionD IQ9vWrnyMcrBrEMhnRXe/h2Ier18xdbI2idFLj7SlIAw2YlIUg+7FXkBOqZxMw4FzfA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=ajaNKjdF; dmarc=pass header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.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 AAD79606A320; Fri, 30 Oct 2026 09:35:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=ajaNKjdF X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=13.77.154.182 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793352914; b=vzcxD4l37iez6mHBbqSTe5km20FVG1hYWfHFCc85m6lojxTvp5xh5A/rAeciFhFGPhA4 jGVML8uo00ewptRhMJ7SzaYjMVMw4zbipbqsx5F4+OhhskD+HAyVr6Bii2f8Djd9eXOG2 4e6TyalVcbh4UCLwcgAGp2X+zcaacAKRhDpWDMro+dtx1FlaZPbR2Uk6wEtDqmVP4iDO3 faR5XKHdWWBINXQK/8u9Q+Z4YlRmLN5YR9rUXck/dB+2c2IT7djPbGKWew9+L99u15Dli 1zrImCDrYbGxUV3lz/C/IbD9O82sLuYTWIUOc9pk29Zs6DQkG2scnC1hraszFLwbCWA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793352914; h=DMARC-Filter:Received:DKIM-Filter:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=a4DxPzJFq+Xx+85XSsmDtCfWeMHzGVT6RmNuzkGCqK0=; b=o8knVLg22SWKp8DP2jWjCLiaxx/7XkSIIEJq35iuNqa02qTu2m8VCHflxKz2i+rj35Ca ng8gOOCMp6mYhr/5mVsc+NLqwKeiw+/OxBuw7UJIn9B6+cokQHi5lrBJ3q8YRguyqyFN6 DfN0rUFs1r493V+kLeWFvCqpALvKgFOiUUe8V1HKIJb+pRo7bM+baFJLSSku5UESlwhop MldnX2AFhyuNZiiyeIHvk/NNrpmHm9MoF70fwkJnSLcVAMxCmclnUa0uxY2v2J4RuxApW PK/FcIaiy21PDaBHeAzgAjyQTpP2lWF7EKsMdxDGQSauKzrqa0hQDxGc1MhGk3X64zA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=ajaNKjdF; arc=none smtp.remote-ip=13.77.154.182 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87E08606A323; Fri, 30 Oct 2026 09:35:13 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 87E08606A323 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com X-Received: by linux.microsoft.com (Postfix, from userid 1173) id D9FCB20B7166; Fri, 30 Oct 2026 02:35:00 -0700 (PDT) X-DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D9FCB20B7166 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1793352900; bh=a4DxPzJFq+Xx+85XSsmDtCfWeMHzGVT6RmNuzkGCqK0=; h=From:To:Cc:Subject:Date:From; b=ajaNKjdFDer3GAXHkQRPDDp0vU1Y1zBVj4/NV6ni/hmVLcfMCP31SHP5r3yQnUp3E BrRWxi9kM+dxbliMh8/GwSK+80jgfBtRLQmmHMrhRT2L3HdGj2Y3l8xtbZCewP1GC2 cDE90UPGdoh3/IpirKeDkyNGrUnwh7UdXa2Kt+fU= X-Cc: Erni Sri Satya Vennela <ernis@linux.microsoft.com>, stable@vger.kernel.org, Wei Liu <liuwe@microsoft.com> X-Mailer: git-send-email 2.43.7 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