HIGH Introduced in 4.10
net/xps TrafficClass OOB
CVE-2026-98567
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: net: xps: reject an out of range traffic class Only the entries below dev->num_tc are valid in dev->tc_to_txq[], and dev->prio_tc_map[] may only name classes below it. netdev_set_num_tc() lowers dev->num_tc without touching either array. netdev_txq_to_tc() walks all TC_MAX_QUEUE slots and netdev_get_prio_tc_map() returns the entry as it stands, so a leftover entry is handed out as a traffic class >= dev->num_tc. Taking that class from netdev_txq_to_tc(), __netif_set_xps_queue() rejects only a negative one and indexes an XPS map sized for dev->num_tc classes: tci = j * num_tc + tc; RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map); attr_map[] holds nr_ids * num_tc entries and j runs over the ids named in the mask, so a class that is not below num_tc pushes tci past the end of the map for the last ids and the store overruns it. Any caller that lowers num_tc leaves such entries behind, and mqprio_destroy() tears down with netdev_set_num_tc(dev, 0) rather than netdev_reset_tc(). After mqprio with 8 classes then 1, tc_to_txq[1..7] still describe txq 1..7. The splat is from an XPS write to txq 2 on a veth with 8 rx queues: attr_map[] has 8 * 1 entries, tci = j + 2, and j == 6 stores one past the end of the 88-byte map: BUG: KASAN: slab-out-of-bounds in __netif_set_xps_queue (net/core/dev.c:2954) Write of size 8 at addr ffff88813016bc58 by task xps_oob/634 __netif_set_xps_queue (net/core/dev.c:2954) xps_rxqs_store (net/core/net-sysfs.c:1880) netdev_queue_attr_store (net/core/net-sysfs.c:1390) Allocated by task 634: __kmalloc_noprof (mm/slub.c:5439) __netif_set_xps_queue (net/core/dev.c:2937) The buggy address is located 0 bytes to the right of allocated 88-byte region [ffff88813016bc00, ffff88813016bc58) Reject a class the map has no room for.
02KernelScan AI Analysis
Risk summary
A local user with CAP_NET_ADMIN (obtainable in a user namespace) can trigger an out-of-bounds write in the kernel's XPS subsystem by configuring mqprio with multiple traffic classes, lowering the class count, and then writing to the XPS sysfs interface. This corrupts heap memory and can lead to privilege escalation or kernel crash.
Vulnerability analysis
When the number of traffic classes (num_tc) is reduced via netdev_set_num_tc(), stale entries remain in the tc_to_txq and prio_tc_map arrays. Later, when an XPS queue mapping is written through sysfs, netdev_txq_to_tc() can return a traffic class index that is now out of range for the current num_tc value. The __netif_set_xps_queue() function only validated that the class was non-negative, not that it was below num_tc, causing an index calculation (tci = j * num_tc + tc) to exceed the allocated attr_map buffer. The fix adds an upper-bounds check (tc >= num_tc) to reject stale traffic classes before they are used to index the map.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.10 | 5.10.271 | 967e10f40a0c |
| 5.15 | 4.10 | 5.15.222 | 1cb8e40525a7 |
| 6.1 | 4.10 | 6.1.189 | 6ea8f643053f |
| 6.12 | 4.10 | 6.12.112 | eff227a3cb4d |
| 6.18 | 4.10 | 6.18.55 | 2cc1c3977acb |
| 6.6 | 4.10 | 6.6.158 | 9e841723ba48 |
| 7.2 | 4.10 | 7.2.9 | 930318290d85 |
| mainline | 4.10 | 7.3 | 4da3b7b8b50f |
| cip/4.19 | 4.10 | 4.19.325-cip137 | 59c3b3325d4e |
| cip/4.19-rt | 4.10 | 4.19.325-cip137-rt51 | 59c3b3325d4e |
| cip/5.10 | 4.10 | 5.10.271-cip78 | 967e10f40a0c |
| cip/5.10-rt | 4.10 | 5.10.272-cip79-rt35 | 967e10f40a0c |
| cip/6.1 | 4.10 | 6.1.189-cip61 | 6ea8f643053f |
| cip/6.1-rt | 4.10 | 6.1.189-cip61-rt32 | 6ea8f643053f |
| cip/6.12 | 4.10 | 6.12.112-cip33 | eff227a3cb4d |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| cip/4.19 | Fixed in 4.19.325-cip137 |
| cip/4.19-rt | Fixed in 4.19.325-cip137-rt51 |