CVE-2026-98022: net: cap tx_queue_len at S16_MAX to prevent oversized ring allocations

Published Sep 25, 2026
·
Updated

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

net: cap txqueuelen at S16MAX to prevent oversized ring allocations

Several subsystems allocate ring buffers sized by dev->txqueuelen with no upper bound. An unprivileged user (via unshare -Urn) can set a huge txqueuelen and exhaust global memory with ring allocations:

- pfifofast: pfifofastinit() and pfifofastchangetxqueuelen() allocate 3 skbarray rings of txqueuelen entries each. - tun: tunqueueresize() and the queue-attach path resize ptrrings to txqueuelen on the NETDEVCHANGETXQUEUELEN notifier. - tap (macvtap/ipvtap): tapqueueresize() and tapinit() resize/init ptrrings to txqueuelen on the same notifier.

netifchangetxqueuelen() is the single entry point for IFLATXQLEN, sysfs, and the SIOCSIFTXQLEN ioctl. Cap newlen at S16MAX (32767) there so the oversized value is rejected at set time. This takes effect whether the device is up or down, before dev->txqueuelen is written, before any notifier fires, and before any ring is allocated. The "> S16MAX" check also subsumes the previous unsigned-long truncation test, and a negative ifrqlen from the ioctl lands far above the cap after conversion, so both old failure modes are covered by the one comparison.

txqueuelen is ambigious: both a per-ring sizing multiplier and a default queue-length/limit knob for consumers that allocate nothing at set time (pfifo/bfifo/gred/plug/sfb limits, htb directqlen, qfq maxclasses, teql). 32767 is chosen as the largest value NLAPOLICYFULLRANGE can express for the u32 IFLATXQLEN policy in patch 2/3 while staying a legitimate queue length on high-BDP paths; the ring-memory trade-off of a shared knob is disclosed below.

Conditions to recreate the bug: - CONFIGNETSCHED=y, CONFIGVETH=y, CONFIGUSERNS=y, CONFIGNETNS=y. - Unprivileged user in a fresh user+net namespace (unshare -Urn). - pfifofast: create veth pairs, set txqueuelen to 500000, attach mq+pfifofast. ~28 iterations OOMs a 2GB guest. - tun: create 50 tun devices with IFFMULTIQUEUE, set txqueuelen to 500000, open 8 queues each. ~1.6GB of ptrring allocations OOMs a 512MB guest. - tap: same as tun with IFFTAP. ~960MB OOMs a 512MB guest. - On the fixed kernel the oversized txqueuelen is rejected with -ERANGE at set time (all four paths: RTMSETLINK, RTMNEWLINK create, sysfs, ioctl - the latter two via this check, the former two via this check and the 2/3 parse policy respectively).

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Cap tx_queue_len at S16_MAX (32767); reject values above 32767 with ERANGE before allocating ring buffers.

    Linux kernel network devices tx_queue_len = 32767

Event History

Sep 25, 2026
CVE Published
via MITRE·10:23 AM
Data Sourced
via MITRE·10:23 AM
Description
Data Sourced
via NVD·11:17 AM
Description

Frequently Asked Questions

1

What level of access does an attacker need?

An unprivileged user can trigger the issue by using unshare -Urn to create a user and network namespace, then setting an excessively large transmit queue length.

2

Which networking components can allocate excessive memory?

The affected ring allocations are in pfifo_fast, tun, and tap implementations including macvtap and ipvtap. These components size skb_array or ptr_ring buffers from the device transmit queue length.

3

Is an interface protected by being down when its queue length is changed?

No. The queue-length limit is applied whether the device is up or down, before the new value is written and before notifiers or ring allocations occur.

4

How can an administrator check whether the fix is present?

Attempting to set a transmit queue length above 32767 through IFLA_TXQLEN, sysfs, or the SIOCSIFTXQLEN ioctl should be rejected at set time. A kernel that accepts such a value does not exhibit the described capped behavior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203