summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorJustin Iurman <justin.iurman@gmail.com>2026-04-04 15:41:37 +0200
committerJakub Kicinski <kuba@kernel.org>2026-04-08 19:08:56 -0700
commitb30b1675aa2bcf0491fd3830b051df4e08a7c8ca (patch)
tree9964a4698417a6c276daaaed576bc91b9d6a41c0 /Kbuild
parentd65b175cfac64ee65506eea7fa573d291a9694ca (diff)
downloadlwn-b30b1675aa2bcf0491fd3830b051df4e08a7c8ca.tar.gz
lwn-b30b1675aa2bcf0491fd3830b051df4e08a7c8ca.zip
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. Fixes: b63c5478e9cb ("ipv6: ioam: Support for Queue depth data field") Reported-by: Jakub Kicinski <kuba@kernel.org> Closes: https://lore.kernel.org/netdev/20260403214418.2233266-2-kuba@kernel.org/ Signed-off-by: Justin Iurman <justin.iurman@gmail.com> Link: https://patch.msgid.link/20260404134137.24553-1-justin.iurman@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions