CVE-2026-142904: veth: clear rx queue hint in veth_xmit
In the Linux kernel, the following vulnerability has been resolved:
veth: clear rx queue hint in vethxmit
With more tx queues on one end of a veth pair than rx queues on the other, and RPS or generic XDP enabled on the receiving end, we get:
veth1 received packet on queue 2, but number of RX queues is 2 WARNING: net/core/dev.c:5212 at getrpscpu+0x560/0x1360 Call Trace: <TASK> netifrxinternal+0x1af/0x4c0 netifrx+0x99/0x350 vethxmit+0x713/0xca0 devhardstartxmit+0x166/0x5f0 devqueuexmit+0x1797/0x42d0 ipfinishoutput2+0xa34/0x1f40 ipfinishoutput+0x510/0x7e0 ipfinishoutput+0x2f/0x320 ipoutput+0x17a/0x3f0 ipsendskb+0x1bc/0x220 ......
Easy to hit with "ethtool -L veth0 tx 4", "ethtool -L veth1 rx 2", rpscpus set on veth1 and a few flows sent over the pair [1].
vethxmit() uses skb->queuemapping to pick the peer rq, but never clears it before vethforwardskb(), so the rx side still sees the tx queue index. Everything on the rx side that goes through skbgetrxqueue(), like getrpscpu() and netifgetrxqueue() for generic XDP, takes it as a recorded rx queue and warns once it is out of range.
Clear it before handing the skb to the peer:
- It is the tx queue index of this device, it says nothing about the rx queue of the peer.
- The two sides don't even agree on the encoding. The tx side stores the index as is, the rx side stores index + 1 so that 0 can mean "not recorded". So tx queue k is read back as rx queue k - 1, and tx queue 0 as "not recorded".
- Commit 710ad98c363a ("veth: Do not record rx queue hint in vethxmit") already decided that veth should not pass any queue hint to the peer. There is no tx->rx queue mapping to preserve, so nothing is lost by clearing it.
On NETDEVTXBUSY the skb goes back to the qdisc, which looks up the txq from skb->queuemapping to decide when to retry, so restore it there, next to the existing skbpush().
[1]: https://lore.kernel.org/netdev/156834bb-8e40-496e-9443-9d515fa18eab@linux.dev/
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 710ad98c363a
Event History
Frequently Asked Questions
Which configurations are affected?
The issue occurs when one end of a veth pair has more transmit queues than the peer has receive queues, and RPS or generic XDP is enabled on the receiving end. Traffic sent across that pair can cause the receiving side to treat a transmit queue index as an RX queue index.
What is needed to trigger the problem?
A mismatched queue configuration is required, along with RPS or generic XDP on the receiving veth interface. The reported reproducer uses four TX queues on one end, two RX queues on the other, RPS enabled on the receiver, and several flows sent over the pair.
How can I determine whether a system is affected?
Look for a kernel warning from get_rps_cpu reporting that a veth interface received a packet on a queue whose number is outside its configured RX queue count. The example warning reports a packet received on queue 2 while the interface has two RX queues.
What can be done before applying the fix?
Avoid configuring more TX queues on one veth endpoint than RX queues on its peer. Where that cannot be changed, disabling RPS and generic XDP on the receiving endpoint avoids the affected RX-queue handling paths.