CVE-2026-98021: net: reject oversized tx_queue_len at netlink parse time
In the Linux kernel, the following vulnerability has been resolved:
net: reject oversized txqueuelen at netlink parse time
rtnlcreatelink() assigns IFLATXQLEN directly to dev->txqueuelen without going through netifchangetxqueuelen(), so a device created with "ip link add ... txqueuelen 500000" bypasses the S16MAX cap and still triggers the oversized ring allocations in pfifofast, tun and tap. The veth peer nest (rtnlnlaparseifinfomsg()) and the RTMNEWLINK-on-existing-device path reach the same sinks.
Enforce the cap in iflapolicy instead: IFLATXQLEN becomes NLAPOLICYFULLRANGE(NLAU32, &txqlenrange) with txqlenrange = { .min = 0, .max = S16MAX }. All netlink consumers parse against this policy - rtnlsetlink(), rtnlnewlink() (create and change), and the veth peer nest - so every netlink path is capped at parse time and rejects the attribute with -ERANGE plus a proper "integer out of range" extack message before any device state is modified (the RTMSETLINK half-application wart is gone with it).
Document the bound in the rt-link.yaml netlink spec.
Conditions to recreate the bug: - CONFIGNETSCHED=y, CONFIGVETH=y, CONFIGUSERNS=y, CONFIGNETNS=y. - Unprivileged user in a fresh user+net namespace (unshare -Urn): ip link add v0 txqueuelen 500000 type veth peer name v1 -> on the fixed kernel this is rejected with -ERANGE ("integer out of range" extack) instead of installing an oversized txqueuelen that later inflates pfifofast/tun/tap ring allocations. - ip link set v0 txqueuelen 500000 is likewise rejected at parse time.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Enforce the tx_queue_len cap at netlink parse time for IFLA_TXQLEN and the veth peer nest using txqlen_range with a minimum of 0 and maximum of S16_MAX, rejecting oversized values with -ERANGE and an appropriate extack message.
Event History
Frequently Asked Questions
Which systems and interface operations are exposed to this issue?
Reproducing the issue requires CONFIG_NET_SCHED, CONFIG_VETH, CONFIG_USER_NS, and CONFIG_NET_NS. The affected netlink paths include creating or changing links, configuring an existing device with RTM_NEWLINK, and processing a veth peer nest.
What must an attacker be able to do to trigger the vulnerable behavior?
They must be able to send a netlink request that supplies an oversized IFLA_TXQLEN value, such as creating a link with a txqueuelen of 500000. The vulnerable paths could then pass that value to devices and queueing implementations including pfifo_fast, tun, and tap.
How can I tell whether the fixed validation is active?
An IFLA_TXQLEN value above S16_MAX is rejected during netlink attribute parsing with -ERANGE and an "integer out of range" extack message. The rejection occurs before device state is modified.