net: ifb: report ethtool stats over num_tx_queues
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a21ee5b2fcb8d6d3973446c5039e966c4cfe40d1 · < 5db89c99566fc4728cc92e941d8e1975711e24b5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ifb: report ethtool stats over num_tx_queues
ifb_dev_init() allocates dp->tx_private to dev->num_tx_queues entries via kzalloc_objs(*txp, dev->num_tx_queues). Both IFB per-queue RX and TX stats live in those entries: ifb_xmit() updates txp->rx_stats using the skb queue mapping, ifb_ri_tasklet() updates txp->tx_stats, and ifb_stats64() aggregates both over dev->num_tx_queues.
The ethtool stats callbacks instead size and walk the per-queue stats with dev->real_num_rx_queues and dev->real_num_tx_queues. With an asymmetric device where the RX queue count exceeds the TX queue count, for example:
ip link add name ifb10 numtxqueues 1 numrxqueues 8 type ifb ethtool -S ifb10
ifb_get_ethtool_stats() indexes past the tx_private allocation and copies adjacent slab data through ETHTOOL_GSTATS.
Use dev->num_tx_queues consistently for the stats strings, the stats count, and the stats data walks. This reports one RX stats group and one TX stats group for each backing ifb_q_private entry, which is the queue set IFB can actually populate.
Reproduced under UML+KASAN at v7.1-rc2:
From the CVE record · Linux
The Linux kernel’s IFB ethtool stats handler can read beyond its allocated per-queue data when an IFB device has more RX queues than TX queues. A local request for that device’s ethtool stats can copy adjacent slab data into the response; the input does not specify authentication requirements.
Engineers running Linux kernels with IFB devices should check their kernel’s status for this issue; no affected version range is provided.