Re: [PATCH] net: sched: sch_multiq: fix possible OOB write in multiq_tune()

From: Cong Wang
Date: Tue Jun 04 2024 - 11:32:54 EST


On Mon, Jun 03, 2024 at 03:13:03PM +0800, Hangyu Hua wrote:
> 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@xxxxxxxxx>

Looks good to me.

Acked-by: Cong Wang <cong.wang@xxxxxxxxxxxxx>

Thanks.