[PATCH net 0/6] net: enetc: SR-IOV robustness and security fixes

Wei Fang posted 6 patches 1 month ago
There is a newer version of this series
.../net/ethernet/freescale/enetc/enetc_msg.c  | 34 +++++++++----------
.../net/ethernet/freescale/enetc/enetc_pf.c   | 28 ++++++++++++---
.../net/ethernet/freescale/enetc/enetc_pf.h   |  1 +
3 files changed, 40 insertions(+), 23 deletions(-)
[PATCH net 0/6] net: enetc: SR-IOV robustness and security fixes
Posted by Wei Fang 1 month ago
This series hardens the ENETC PF driver's SR-IOV implementation by
fixing multiple security and stability issues in the VF-to-PF mailbox
communication path, identified through code review.

Issues addressed:
  - Missing input validation for VF requests (security)
  - Race conditions in VF state management (stability)
  - Initialization ordering bugs (reliability)
  - Resource cleanup issues (memory safety)
  - Missing ratelimiting in error paths (DoS prevention)

All issues are theoretical (found through static analysis) but represent
real vulnerabilities exploitable by malicious guests or buggy VF drivers.

Wei Fang (6):
  net: enetc: validate VF primary MAC address before configuration
  net: enetc: fix race condition in VF MAC address configuration
  net: enetc: fix use-after-free in mailbox cleanup on interrupt race
  net: enetc: avoid VF->PF mailbox timeout during SR-IOV teardown
  net: enetc: fix initialization order to prevent use of uninitialized
    resources
  net: enetc: add ratelimiting to VF mailbox error messages

 .../net/ethernet/freescale/enetc/enetc_msg.c  | 34 +++++++++----------
 .../net/ethernet/freescale/enetc/enetc_pf.c   | 28 ++++++++++++---
 .../net/ethernet/freescale/enetc/enetc_pf.h   |  1 +
 3 files changed, 40 insertions(+), 23 deletions(-)

-- 
2.34.1
Re: [PATCH net 0/6] net: enetc: SR-IOV robustness and security fixes
Posted by Harshitha Ramamurthy 3 weeks, 2 days ago
On Wed, May 13, 2026 at 4:02 AM Wei Fang <wei.fang@nxp.com> wrote:
>
> This series hardens the ENETC PF driver's SR-IOV implementation by
> fixing multiple security and stability issues in the VF-to-PF mailbox
> communication path, identified through code review.
>
> Issues addressed:
>   - Missing input validation for VF requests (security)
>   - Race conditions in VF state management (stability)
>   - Initialization ordering bugs (reliability)
>   - Resource cleanup issues (memory safety)
>   - Missing ratelimiting in error paths (DoS prevention)
>
> All issues are theoretical (found through static analysis) but represent
> real vulnerabilities exploitable by malicious guests or buggy VF drivers.
>
> Wei Fang (6):
>   net: enetc: validate VF primary MAC address before configuration
>   net: enetc: fix race condition in VF MAC address configuration
>   net: enetc: fix use-after-free in mailbox cleanup on interrupt race
>   net: enetc: avoid VF->PF mailbox timeout during SR-IOV teardown
>   net: enetc: fix initialization order to prevent use of uninitialized
>     resources
>   net: enetc: add ratelimiting to VF mailbox error messages

Series LGTM. If the commit message for patch 8 is updated, feel free to add:

Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>

>
>  .../net/ethernet/freescale/enetc/enetc_msg.c  | 34 +++++++++----------
>  .../net/ethernet/freescale/enetc/enetc_pf.c   | 28 ++++++++++++---
>  .../net/ethernet/freescale/enetc/enetc_pf.h   |  1 +
>  3 files changed, 40 insertions(+), 23 deletions(-)
>
> --
> 2.34.1
>
>