From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385359; b=J4izLrh6IcdwxexTVF2ShIYj037ax9J8ad6olI/q1UnYg4M4nW2SeiBomysa2LsPuWfp pTonOz2jhVRZAbdxqybPgUC5l792wh9dFJm1Qo5LGBER1y+IxjBnVy/BnL/P4+820SMeh P8p3HR9kT+k5yG8i1/qVAiuiz4dzfMbPM3PEZMMyweEuL2W1l8tEvyi27VRA7DiOg6jaf rbVH22pN4uCg2X7tdm1mFnBCoz4H33/EBVRf3l9vNZ6ps6HCbqIj559KVwyKLr7jcBYMo INxUjyKZs++3Z3wklHzFgR5XsHOFot7VksT4WVvp9CVuH7Ck1lBNupVBeK5FUk+tzqA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385359; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=6Ad4J6JMNQ9QESZmnhOPAWQY1kB/viy4cy0IlOMsHn8=; b=hk8Z0HaD+kD9p1fSyOzHs+QFZ8oHF+Rx4kAyIXNREPxAeNcw0a2TkQgZ6dY5K3fuUPLT H9iserhwu8Gkqbg0inZkHpAaHxVOogDXOrB5i1rlRyjkh56wi7m3TJR/vJJxZOcmhRkt+ 0zdLQqfGV7ptjAWXmXQ3HAiM5dMj5uHWtZvJQg6XE0hKG8uwYp0tbeEqx4wiQpzSRGu8k Ng0ncP2cgFZHohZzNW/GyLy30TTH/7i52UkYd4haxlC7/vVWQuMoFXckTCGDm/qc10+do Xys490jAo4HJ8fXwGjFxxPHl6fmz4WPDevrWZh46A4pbNZtArCHBl0Akh0rB9/jGDtA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=kBTVHXTH; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D867606A32D; Fri, 4 Dec 2026 11:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=kBTVHXTH Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65F761F00897; Fri, 4 Dec 2026 11:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385358; bh=6Ad4J6JMNQ9QESZmnhOPAWQY1kB/viy4cy0IlOMsHn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kBTVHXTHYPJYWFOp4SNProaRwtyrG9JDE56RRTZFLGOZ96zalG+FGcfNdbcyxiJZn 3Td0pdTOvJjeED8b+UfSWxmhs+yaMG55DmqFZ+p/Ta06FZjDVIUtpDC5MgSzRvCqHY Rg4KqSYlAsg3Z2Q0+l22PGBCgi3GhvDjv7GmDTL4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Erni Sri Satya Vennela , Haiyang Zhang , Wei Liu , Simon Horman , Dave Miller Subject: [PATCH 6.6 0524/1167] hv_netvsc: Stop PPI parsing on invalid metadata Date: Fri, 4 Dec 2026 18:59:11 +0900 Message-ID: <20261204100715.706504220@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Erni Sri Satya Vennela commit 19a227903e65c7a9c179156485660a4e017575fe upstream. 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 Reviewed-by: Haiyang Zhang Reviewed-by: Wei Liu Reviewed-by: Simon Horman Signed-off-by: Dave Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/hyperv/rndis_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -402,12 +402,12 @@ static inline void *rndis_get_ppi(struct /* 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) { @@ -415,7 +415,7 @@ static inline void *rndis_get_ppi(struct 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); }