net: ioam6: fix OOB and missing lock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b63c5478e9cb1d1504eb02d9dac827ad24612b32 · < b30b1675aa2bcf0491fd3830b051df4e08a7c8ca| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ioam6: fix OOB and missing lock
When trace->type.bit6 is set:
if (trace->type.bit6) { ... queue = skb_get_tx_queue(dev, skb); qdisc = rcu_dereference(queue->qdisc);
This code can lead to an out-of-bounds access of the dev->_tx[] array when is_input is true. In such a case, the packet is on the RX path and skb->queue_mapping contains the RX queue index of the ingress device. If the ingress device has more RX queues than the egress device (dev) has TX queues, skb_get_queue_mapping(skb) will exceed dev->num_tx_queues. Add a check to avoid this situation since skb_get_tx_queue() does not clamp the index. This issue has also revealed that per queue visibility cannot be accurate and will be replaced later as a new feature.
While at it, add missing lock around qdisc_qstats_qlen_backlog(). The function __ioam6_fill_trace_data() is called from both softirq and process contexts, hence the use of spin_lock_bh() here.
From the CVE record · Linux
Linux kernel ioam6 trace handling can access beyond an egress device’s transmit-queue array when trace type bit 6 is set and a packet on the receive path has a queue index greater than the egress device’s transmit-queue count. The affected code also lacks a lock around queue statistics access. The input does not establish whether authentication or user interaction is required.
Engineers running Linux kernels with ioam6 should check their kernel version against the vendor advisory; affected versions were not provided.