Thread View: linux.kernel.netdev
5 messages
5 total messages
Started by Erni Sri Satya Vennela
Tue, 27 Oct 2026 16:47
[PATCH net] hv_netvsc: Stop PPI parsing on invalid metadata
Author: Erni Sri Satya Vennela
Date: Tue, 27 Oct 2026 16:47
Date: Tue, 27 Oct 2026 16:47
52 lines
9608 bytes
9608 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.
Fixes: 44144185951a ("hv_netvsc: Add validation for untrusted Hyper-V values")
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>
---
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
Re: [PATCH net] hv_netvsc: Stop PPI parsing on invalid metadata
Author: netdev-bot+sinfo
Date: Tue, 27 Oct 2026 16:50
Date: Tue, 27 Oct 2026 16:50
22 lines
8751 bytes
8751 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan. - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH net] hv_netvsc: Stop PPI parsing on invalid metadata
Author: Hamza Mahfooz
Date: Wed, 28 Oct 2026 14:20
Date: Wed, 28 Oct 2026 14:20
58 lines
10376 bytes
10376 bytes
On Tue, Oct 27, 2026 at 09:47:22AM -0700, Erni Sri Satya Vennela wrote:
> 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.
>
If you have reproduced this, I would strongly suggest that you
Cc: stable this patch.
> 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.
>
> Fixes: 44144185951a ("hv_netvsc: Add validation for untrusted Hyper-V values")
> 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>
> ---
> 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
>
Re: [PATCH net] hv_netvsc: Stop PPI parsing on invalid metadata
Author: Erni Sri Satya Vennela
Date: Thu, 29 Oct 2026 05:23
Date: Thu, 29 Oct 2026 05:23
31 lines
9431 bytes
9431 bytes
On Tue, Oct 27, 2026 at 04:50:15PM +0000, netdev-bot+sinfo@kernel.org wrote: > Hi! > > This is an automated message. This series looks like a fix, but its > commit messages seem to be missing some information: > > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. > > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by code inspection). If it was triggered please include > the symptoms, like the stack trace or error messages. > > Please do not repost the series just to address the above. Instead, > reply to this email with the missing information, so that reviewers > can take it into account. If the series needs another revision for > other reasons, please include the information in the commit messages > then. > > The evaluation is done by an LLM so it may be wrong, if you think > that is the case please reply and explain. This patch was prompted by a bug report received through internal bug tracking system, and I have also confirmed the faulty control flow by manual code inspection. I have not independently reproduced the pre-fix hang. - Vennela
Re: [PATCH net] hv_netvsc: Stop PPI parsing on invalid metadata
Author: Erni Sri Satya Vennela
Date: Thu, 29 Oct 2026 05:25
Date: Thu, 29 Oct 2026 05:25
19 lines
8998 bytes
8998 bytes
On Wed, Oct 28, 2026 at 10:20:00AM -0400, Hamza Mahfooz wrote: > On Tue, Oct 27, 2026 at 09:47:22AM -0700, Erni Sri Satya Vennela wrote: > > 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. > > > > If you have reproduced this, I would strongly suggest that you > Cc: stable this patch. > Thankyou for the review, Hamza. I will make this change in the next version. - Vennela
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads