Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF
@ 2026-09-07 12:15 Potin Lai
  2026-09-07 12:15 ` [PATCH 1/2] net: usb: cdc_ether: add NCSI passthrough support Potin Lai
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Potin Lai @ 2026-09-07 12:15 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Oliver Neukum, Samuel Mendoza-Jonas, Paul Fertser,
	Simon Horman
  Cc: linux-usb, netdev, linux-kernel, Cosmo Chou, Mike Hsieh, Mik Lin,
	Potin Lai, Potin Lai, Adrian Ambrozewicz

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@gmail.com>
---
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@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-09 18:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 12:15 [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF Potin Lai
2026-09-07 12:15 ` [PATCH 1/2] net: usb: cdc_ether: add NCSI passthrough support Potin Lai
2026-09-07 18:17   ` Andrew Lunn
2026-09-08 12:45     ` Potin Lai
2026-09-08 13:54       ` Andrew Lunn
2026-09-07 12:15 ` [PATCH 2/2] net/ncsi: fix use-after-free in ncsi_unregister_dev() Potin Lai
2026-09-07 18:23 ` [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF Andrew Lunn
2026-09-08 12:33   ` Potin Lai
2026-09-09 18:42     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox