summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-pow.c
diff options
context:
space:
mode:
authorVictor Nogueira <victor@mojatatu.com>2025-04-26 01:07:06 +0300
committerJakub Kicinski <kuba@kernel.org>2025-04-29 01:55:06 +0300
commit141d34391abbb315d68556b7c67ad97885407547 (patch)
treec824e4c86982438cc95202495909e8e7ad25ce12 /lib/mpi/mpi-pow.c
parentf99a3fbf023e20b626be4b0f042463d598050c9a (diff)
downloadlinux-141d34391abbb315d68556b7c67ad97885407547.tar.xz
net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
As described in Gerrard's report [1], we have a UAF case when an hfsc class has a netem child qdisc. The crux of the issue is that hfsc is assuming that checking for cl->qdisc->q.qlen == 0 guarantees that it hasn't inserted the class in the vttree or eltree (which is not true for the netem duplicate case). This patch checks the n_active class variable to make sure that the code won't insert the class in the vttree or eltree twice, catering for the reentrant case. [1] https://lore.kernel.org/netdev/CAHcdcOm+03OD2j6R0=YHKqmy=VgJ8xEOKuP6c7mSgnp-TEJJbw@mail.gmail.com/ Fixes: 37d9cf1a3ce3 ("sched: Fix detection of empty queues in child qdiscs") Reported-by: Gerrard Tai <gerrard.tai@starlabs.sg> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Victor Nogueira <victor@mojatatu.com> Link: https://patch.msgid.link/20250425220710.3964791-3-victor@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-pow.c')
0 files changed, 0 insertions, 0 deletions