]> www.infradead.org Git - users/hch/xfs.git/commit
net: sched: sch_multiq: fix possible OOB write in multiq_tune()
authorHangyu Hua <hbh25y@gmail.com>
Mon, 3 Jun 2024 07:13:03 +0000 (15:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2024 09:50:19 +0000 (10:50 +0100)
commitaffc18fdc694190ca7575b9a86632a73b9fe043d
tree8a6a1c3557ce53857aecb2d83fe9dadfb6997f6a
parent491aee894a08bc9b8bb52e7363b9d4bc6403f363
net: sched: sch_multiq: fix possible OOB write in multiq_tune()

q->bands will be assigned to qopt->bands to execute subsequent code logic
after kmalloc. So the old q->bands should not be used in kmalloc.
Otherwise, an out-of-bounds write will occur.

Fixes: c2999f7fb05b ("net: sched: multiq: don't call qdisc_put() while holding tree lock")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Acked-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_multiq.c