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=1796388147; b=u1gkLtQAj2kGetiLsO5GvCwL0lAkj9r+oqS4mqlrSeL5zfjww1vTYlSjA7La5cVdiEJZ FoB7nUTBBfpCuqdNM4ztTQ7bLeD5zkxPrnHdGfqnD+IlflKao73fLXl27SxhqIIpo35E2 BoQnsnqXWOKU0xh1XY63XIzO3zs8M9yXIaZIRe4k6wJynE+tgy062OhV4M9dnJEa7+MHe XEXGYPnW21nhhmGrrfMzu80Ht0Zx/r0V51+XwEGqoN2Zrk3TNQkxWBkkdxr31aiY1jqDv KAZKqOUKdMQsaddfDhgcMrd3TYxlHZxU/y+UkWF9FcD3ZEx3a3RxpXuse+Lz+vgyhUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388147; 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=b+eBjHA08Gii05d0UeHbsvvsBeX+JNFvjSL1lMLavN8=; b=C/P44DrBvUmN99w1eT4sO36dZjutdGSfewe+hPnQPfZBxBKZ8MPvFd8VlbZuEpkbUqPC kTzqWl/qrSkDqT9+ZfFoxf4Q2XHr96XV5OKYuVhALMhsTKZDQeAKZzn8mOo8vtEHj4SyB MaoUifnElPLyo7/FhCIs392I5RG0T1hZIn3y6nWzZLHAsBrb2sx7gSkM1Bl+AH7RfW+0I ayAbFYQ0UTetKgk4Q/F6EzVd1uNSEc+H0e0GTH+c1L6AJBpTiO/Pe4BeNZ9/gn8F6AxT6 RK1x5+bJ0a5bhKmW3ux7sgIcz2fq2ACgXg+fVFulRWYbXn2Hhnk6fb6qFx3S6eL0pyQ== 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=0KQdJVTx; 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 6CEE8606A330; Fri, 4 Dec 2026 12:42:27 +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=0KQdJVTx Received: by smtp.kernel.org (Postfix) with ESMTPSA id D55CC1F00934; Fri, 4 Dec 2026 12:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388147; bh=b+eBjHA08Gii05d0UeHbsvvsBeX+JNFvjSL1lMLavN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0KQdJVTxxkLihZ8qGz82qkiUaun61U2J8DAP1Fni5vdxRpXZ3lAObak7lK2dZdVXK W8znu7sIaKox0/coLALGJ0EWUYRIt+hlgx575yztDqR70eJ9whb+MWRwXxjzRjWYPG HVb+hkjd2uXXaJZOuA2IjvIsmqhJ69fMM7dZYWXE= 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.1 0503/1059] hv_netvsc: Stop PPI parsing on invalid metadata Date: Fri, 4 Dec 2026 19:00:34 +0900 Message-ID: <20261204100657.280784335@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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); }