[PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF

From: Potin Lai

Date: Mon Sep 07 2026 - 08:31:15 EST


This series introduces NCSI (Network Controller Sideband Interface)
passthrough support for USB CDC Ethernet devices and fixes a
use-after-free race condition in the NCSI core unregistration path.

In DPU (Data Processing Unit) platforms such as the NVIDIA BlueField
series, the Baseboard Management Controller (BMC) communicates with the
host or DPU via a dedicated USB CDC Ethernet connection for out-of-band
management traffic.

Unlike traditional platform Ethernet devices where NCSI is initialized
statically at probe time, USB devices require dynamic lifecycle
management within ndo_open() and ndo_stop():

1. NCSI control packets share the USB data path, requiring the link
carrier to remain enabled while the interface is up.
2. In USB drivers, usbnet_disconnect() invokes unregister_netdev()
before unbind(). Performing NCSI registration in ndo_open() and
cleanup in ndo_stop() ensures NCSI packet handlers are removed before
netdevice teardown occurs.
3. Dynamic unregistration of NCSI devices revealed a race in the NCSI
core: ncsi_unregister_dev() freed the ncsi_dev_priv structure while
asynchronous request timers and workqueue items were still active.

Signed-off-by: Potin Lai <potin.lai.pt@xxxxxxxxx>
---
Adrian Ambrozewicz (2):
net: usb: cdc_ether: add NCSI passthrough support
net/ncsi: fix use-after-free in ncsi_unregister_dev()

drivers/net/usb/Kconfig | 20 +++++
drivers/net/usb/cdc_ether.c | 190 +++++++++++++++++++++++++++++++++++++++++++-
net/ncsi/ncsi-manage.c | 19 +++++
3 files changed, 228 insertions(+), 1 deletion(-)
---
base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
change-id: 20260907-ncsi-over-usb-3e786f4686c8

Best regards,
--
Potin Lai <potin.lai.pt@xxxxxxxxx>