]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sched: sch_qfq: do not free existing class in qfq_change_class()
authorEric Dumazet <edumazet@google.com>
Mon, 12 Jan 2026 17:56:56 +0000 (17:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:21:18 +0000 (11:21 +0100)
commite9d8f11652fa08c647bf7bba7dd8163241a332cd
tree4131ec22f508a8ef1a388e0f56e0fd310f83e4fe
parenta3a4296d8b5b10135248c61e0c06c867c17d80e2
net/sched: sch_qfq: do not free existing class in qfq_change_class()

[ Upstream commit 3879cffd9d07aa0377c4b8835c4f64b4fb24ac78 ]

Fixes qfq_change_class() error case.

cl->qdisc and cl should only be freed if a new class and qdisc
were allocated, or we risk various UAF.

Fixes: 462dbc9101ac ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost")
Reported-by: syzbot+07f3f38f723c335f106d@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6965351d.050a0220.eaf7.00c5.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20260112175656.17605-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_qfq.c