CVE-2026-143128

Not scored yetLast modified Dec 3, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

net: wait for in-flight device unregistrations before netns dismantle

A device can be unregistered by a context other than the cleanup_net() of its own netns, for instance a veth whose peer in another netns is deleted. If references on it are still held, it stays in netdev_wait_allrefs_any(), which rebroadcasts NETDEV_UNREGISTER every second.

Meanwhile its netns can be dismantled: default_device_exit_batch() only takes care of devices still listed in the netns, then pernet exit handlers free their state, and finally struct net is freed while the device still points to it.

The rebroadcasts then run notifiers against torn down pernet state, or freed memory. Three instances were reported so far:

- netdev_genl_netdevice_event(): net->genl_sock is NULL [1] - nh_netdev_event(): net->nexthop.devhash is NULL [2] - nf_tables netdevice notifiers: use-after-free of the nftables pernet storage [3]

but any notifier using dev_net(dev) is affected, as is netdev_wait_allrefs_any() itself (__rtnl_net_lock(dev_net(dev)) with CONFIG_DEBUG_NET_SMALL_RTNL=y).

This was prevented by rtnl_lock_unregistering() until I removed it in commit 8a4fc54b07d7 ("net: get rid of rtnl_lock_unregistering()"), considering only the loopback dependency, and missing the notifiers one.

Restore a per-netns counter of devices sitting in netdev_run_todo(), and make default_device_exit_batch() wait for it to reach zero, after it has unregistered all devices of the dying netns(es). At this point no new unregistration can be started for these netns.

Unlike the old barrier, this only waits for devices of the netns being dismantled and runs after their own devices are gone.

Tested on a KASAN kernel with a debug-only hack holding a reference on a veth device for 5 seconds after its unregistration: a nexthop on the veth in netns X, delete its peer from init_net, then delete X. Without this patch, the nexthop_flush_dev() null-ptr-deref from [2] triggers. With it, no splat; netns churn and dismantle of a netns whose own device is held still work.

[1] https://lore.kernel.org/netdev/6adf9f64.6200f071.51519.0ed1.GAE@google.com/ [2] https://lore.kernel.org/netdev/20261105114707.3030737-1-bsdhenrymartin@gmail.com/ [3] https://lore.kernel.org/netdev/20261105114817.3033625-1-bsdhenrymartin@gmail.com/

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-143129In the Linux kernel, the following vulnerability has been resolved: net/sched: act_ife: require a full Ethernet header on egress This is aCVE-2026-143135.3PeproDev WooCommerce Receipt Uploader (PeproDev WooCommerce Receipt Uploader WordPress plugin through 2.8.0 slug: pepro-bacs-receipt-upload-CVE-2026-143130In the Linux kernel, the following vulnerability has been resolved: net/sched: act_ife: encode configured zero metadata values Reported byCVE-2026-143131In the Linux kernel, the following vulnerability has been resolved: net/sched: sch_teql: reject qdiscs from another network namespace RepoCVE-2026-143132In the Linux kernel, the following vulnerability has been resolved: netfs: don't hang a read whose retry is abandoned When ->prepare_read(CVE-2026-143133In the Linux kernel, the following vulnerability has been resolved: netfs: preserve prepare_write errno on reissue prepare_write() may calCVE-2026-143134In the Linux kernel, the following vulnerability has been resolved: netfilter: xt_recent: do not call remove_proc_entry() under recent_lockCVE-2026-143135In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_dup: preserve guard across NFQUEUE reinjection NFQUEUE cCVE-2026-143136In the Linux kernel, the following vulnerability has been resolved: net: gro: invalidate frag0 after a pull Since commit bd56a29c7a4e ("neCVE-2026-143137In the Linux kernel, the following vulnerability has been resolved: net: gro: do not undo remote checksum offload on merged packets skb_grCVE-2026-143138In the Linux kernel, the following vulnerability has been resolved: net: gro: avoid parsing headers from shared fragments When an skb has CVE-2026-143139In the Linux kernel, the following vulnerability has been resolved: hv_sock: Report no unread data before a channel is available The Hyper
CVE-2026-143128: Unscored | Vulnix