# Re: \[PATCH net\] hv\_netvsc: Reset the RSC count if NVSP\_STAT\_FAIL in netvsc\_receive()

- From: Jesse Brandeburg \<hidden\>
- Date: 2021-02-03 23:26:41 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/02/6257830
- Thread: https://ratatoskr.run/linux-hyperv/2021/02/6256909/t.md

```text
Andrea Parri (Microsoft) wrote:

> Commit 44144185951a0f ("hv_netvsc: Add validation for untrusted Hyper-V
> values") added validation to rndis_filter_receive_data() (and
> rndis_filter_receive()) which introduced NVSP_STAT_FAIL-scenarios where
> the count is not updated/reset.  Fix this omission, and prevent similar
> scenarios from occurring in the future.
> 
> Reported-by: Juan Vazquez <redacted>
> Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: <redacted>
> Fixes: 44144185951a0f ("hv_netvsc: Add validation for untrusted Hyper-V values")

Reviewed-by: Jesse Brandeburg <redacted>

```
