CVE-2026-31469
Received Received - Intake
Use-After-Free Vulnerability in Linux virtio_net Driver Causes Kernel Crash

Publication date: 2026-04-22

Last updated on: 2026-04-27

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: virtio_net: Fix UAF on dst_ops when IFF_XMIT_DST_RELEASE is cleared and napi_tx is false A UAF issue occurs when the virtio_net driver is configured with napi_tx=N and the device's IFF_XMIT_DST_RELEASE flag is cleared (e.g., during the configuration of tc route filter rules). When IFF_XMIT_DST_RELEASE is removed from the net_device, the network stack expects the driver to hold the reference to skb->dst until the packet is fully transmitted and freed. In virtio_net with napi_tx=N, skbs may remain in the virtio transmit ring for an extended period. If the network namespace is destroyed while these skbs are still pending, the corresponding dst_ops structure has freed. When a subsequent packet is transmitted, free_old_xmit() is triggered to clean up old skbs. It then calls dst_release() on the skb associated with the stale dst_entry. Since the dst_ops (referenced by the dst_entry) has already been freed, a UAF kernel paging request occurs. fix it by adds skb_dst_drop(skb) in start_xmit to explicitly release the dst reference before the skb is queued in virtio_net. Call Trace: Unable to handle kernel paging request at virtual address ffff80007e150000 CPU: 2 UID: 0 PID: 6236 Comm: ping Kdump: loaded Not tainted 7.0.0-rc1+ #6 PREEMPT ... percpu_counter_add_batch+0x3c/0x158 lib/percpu_counter.c:98 (P) dst_release+0xe0/0x110 net/core/dst.c:177 skb_release_head_state+0xe8/0x108 net/core/skbuff.c:1177 sk_skb_reason_drop+0x54/0x2d8 net/core/skbuff.c:1255 dev_kfree_skb_any_reason+0x64/0x78 net/core/dev.c:3469 napi_consume_skb+0x1c4/0x3a0 net/core/skbuff.c:1527 __free_old_xmit+0x164/0x230 drivers/net/virtio_net.c:611 [virtio_net] free_old_xmit drivers/net/virtio_net.c:1081 [virtio_net] start_xmit+0x7c/0x530 drivers/net/virtio_net.c:3329 [virtio_net] ... Reproduction Steps: NETDEV="enp3s0" config_qdisc_route_filter() { tc qdisc del dev $NETDEV root tc qdisc add dev $NETDEV root handle 1: prio tc filter add dev $NETDEV parent 1:0 \ protocol ip prio 100 route to 100 flowid 1:1 ip route add 192.168.1.100/32 dev $NETDEV realm 100 } test_ns() { ip netns add testns ip link set $NETDEV netns testns ip netns exec testns ifconfig $NETDEV 10.0.32.46/24 ip netns exec testns ping -c 1 10.0.32.1 ip netns del testns } config_qdisc_route_filter test_ns sleep 2 test_ns
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-22
Last Modified
2026-04-27
Generated
2026-05-07
AI Q&A
2026-04-22
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux_kernel linux_kernel 7.0.0-rc1
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a Use-After-Free (UAF) issue in the Linux kernel's virtio_net driver. It occurs when the driver is configured with napi_tx set to false and the device's IFF_XMIT_DST_RELEASE flag is cleared. Under these conditions, the network stack expects the driver to hold a reference to the packet's destination (skb->dst) until the packet is fully transmitted and freed.

However, with napi_tx disabled, packets (skbs) may remain in the transmit ring for a long time. If the network namespace is destroyed while these packets are still pending, the associated destination operations structure (dst_ops) is freed. Later, when the driver tries to release old packets, it calls a function that accesses this already freed dst_ops, causing a kernel paging request on freed memory, which is a UAF error.

The fix involves explicitly releasing the destination reference before queuing the packet in virtio_net, preventing the use of freed memory.


How can this vulnerability impact me? :

This vulnerability can lead to a kernel crash or system instability due to the use of freed memory in the kernel's networking code. Such crashes can cause denial of service (DoS) conditions on affected systems.

In environments using the virtio_net driver with the specific configuration (napi_tx disabled and IFF_XMIT_DST_RELEASE flag cleared), an attacker or misconfiguration could trigger this issue, potentially disrupting network functionality or causing unexpected system behavior.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by reproducing the conditions that trigger the use-after-free (UAF) issue in the virtio_net driver. The provided reproduction steps involve configuring a traffic control (tc) route filter and manipulating network namespaces to observe the fault.

  • Use the following commands to configure the qdisc route filter on the network device (replace enp3s0 with your device name):
  • tc qdisc del dev enp3s0 root
  • tc qdisc add dev enp3s0 root handle 1: prio
  • tc filter add dev enp3s0 parent 1:0 protocol ip prio 100 route to 100 flowid 1:1
  • ip route add 192.168.1.100/32 dev enp3s0 realm 100

Then, create and delete a network namespace while moving the device into it and sending traffic to trigger the issue:

  • ip netns add testns
  • ip link set enp3s0 netns testns
  • ip netns exec testns ifconfig enp3s0 10.0.32.46/24
  • ip netns exec testns ping -c 1 10.0.32.1
  • ip netns del testns

Repeating the namespace creation and deletion with a short delay may help detect the vulnerability by causing a kernel paging request error if the system is vulnerable.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability is fixed by adding a call to skb_dst_drop(skb) in the start_xmit function of the virtio_net driver to explicitly release the dst reference before the skb is queued. Immediate mitigation steps include:

  • Update the Linux kernel to a version that includes the fix for this vulnerability (e.g., version 7.0.0-rc1+ #6 PREEMPT or later where the patch is applied).
  • Avoid configurations that clear the IFF_XMIT_DST_RELEASE flag on virtio_net devices while napi_tx is disabled (napi_tx=N), such as certain tc route filter rules.
  • If possible, enable napi_tx to avoid the conditions that lead to the use-after-free.

These steps help prevent the use-after-free condition and the resulting kernel paging request error.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart