In the Linux kernel, the following vulnerability has been resolved:
net: serialize netif_running() check in enqueue_to_backlog()
Syzbot reported a KASAN slab-use-after-free in fib_rules_lookup().
The root cause is a race condition where packets can escape the backlog
flushing during device unregistration (e.g., during netns exit).
Commit e9e4dd3267d0 ("net: do not process device backlog during unregistration")
introduced a lockless netif_running() check in enqueue_to_backlog() to
prevent queuing packets to an unregistering device.
However, this creates a TOCTOU race window.
A lockless transmitter (like veth_xmit) can pass
the check before dev_close() clears IFF_UP. If the transmitter is then
delayed, flush_all_backlogs() can run and finish before the transmitter
grabs the backlog lock and queues the packet. The packet then escapes
the flush and triggers UAF later when processed.
Fix this by moving the netif_running() check inside the backlog lock.
This serializes the check with the flush work (which also grabs the lock).
We then either queue the packet before the flush runs (so it gets flushed),
or check netif_running() after the flush/close completes (so it gets dropped).
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS Score: 9.9
AV:N - The bug is in the generic per-CPU backlog receive path (netif_rx/netif_receive_skb -> enqueue_to_backlog); packets can originate from remote peers reaching veth/bridge/NIC interfaces, and syzbot reproduced it via network transmit/receive activity during device unregistration.
AC:L - The attacker controls both racing sides by concurrently flooding packets through a lockless transmitter (e.g. veth) while unregistering the device/netns (e.g. ip link del or netns exit); no victim-specific timing or memory layout is required beyond repeatable parallel traffic and teardown.
PR:L - Triggering veth creation, traffic injection, and netdev/netns teardown requires only CAP_NET_ADMIN inside a network namespace, obtainable by an unprivileged local user via user namespaces (unshare -Urn); init-namespace root is not required.
UI:N - Exploitation needs only the attacker's own concurrent packet transmission and interface/netns teardown; no independent action by another user or administrator is required at trigger time.
S:C - The use-after-free is triggered from within an isolated network namespace yet corrupts host-global kernel routing state (fib_rules_lookup on freed namespace/rule data), crossing the container/netns security boundary into the host kernel's integrity and availability.
C:H - KASAN reported slab-use-after-free in fib_rules_lookup() walking net->rules_ops; freed namespace/device-associated structures can be reallocated and read through stale pointers, yielding an attacker-influenceable kernel memory read/disclosure primitive.
I:H - Processing the escaped backlog skb invokes routing through freed fib_rules_ops and indirect function pointers (ops->match/ops->action); UAF on these heap objects enables heap grooming, control-flow hijack, and arbitrary kernel write leading to privilege escalation.
A:H - Confirmed slab-use-after-free in core packet processing during device unregistration reliably causes kernel oops/panic (syzbot KASAN splat in fib_rules_lookup()), and repeated triggering can deny service to the entire host.
| Attack Vector |
Network |
Scope |
Changed |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The bug is in the generic per-CPU backlog receive path (netif_rx/netif_receive_skb -> enqueue_to_backlog); packets can originate from remote peers reaching veth/bridge/NIC interfaces, and syzbot reproduced it via network transmit/receive activity during device unregistration.
AC:L - The attacker controls both racing sides by concurrently flooding packets through a lockless transmitter (e.g. veth) while unregistering the device/netns (e.g. ip link del or netns exit); no victim-specific timing or memory layout is required beyond repeatable parallel traffic and teardown.
PR:L - Triggering veth creation, traffic injection, and netdev/netns teardown requires only CAP_NET_ADMIN inside a network namespace, obtainable by an unprivileged local user via user namespaces (unshare -Urn); init-namespace root is not required.
UI:N - Exploitation needs only the attacker's own concurrent packet transmission and interface/netns teardown; no independent action by another user or administrator is required at trigger time.
S:C - The use-after-free is triggered from within an isolated network namespace yet corrupts host-global kernel routing state (fib_rules_lookup on freed namespace/rule data), crossing the container/netns security boundary into the host kernel's integrity and availability.
C:H - KASAN reported slab-use-after-free in fib_rules_lookup() walking net->rules_ops; freed namespace/device-associated structures can be reallocated and read through stale pointers, yielding an attacker-influenceable kernel memory read/disclosure primitive.
I:H - Processing the escaped backlog skb invokes routing through freed fib_rules_ops and indirect function pointers (ops->match/ops->action); UAF on these heap objects enables heap grooming, control-flow hijack, and arbitrary kernel write leading to privilege escalation.
A:H - Confirmed slab-use-after-free in core packet processing during device unregistration reliably causes kernel oops/panic (syzbot KASAN splat in fib_rules_lookup()), and repeated triggering can deny service to the entire host.
CVSS 3.1