net/sched: sch_qfq: reintroduce lmax bound check for MTU
authorPedro Tammela <pctammela@mojatatu.com>
Tue, 11 Jul 2023 21:01:00 +0000 (18:01 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:50 +0000 (13:49 +0200)
commitd34a3470ed4090eb1e3440f024c596ace6060506
tree54497dcc9444f547df254432cc6d868fd5d3f3e0
parentff06cd411aa0b70ee8cc50acf39fa37087ca3722
net/sched: sch_qfq: reintroduce lmax bound check for MTU

commit 158810b261d02fc7dd92ca9c392d8f8a211a2401 upstream.

25369891fcef deletes a check for the case where no 'lmax' is
specified which 3037933448f6 previously fixed as 'lmax'
could be set to the device's MTU without any bound checking
for QFQ_LMAX_MIN and QFQ_LMAX_MAX. Therefore, reintroduce the check.

Fixes: 25369891fcef ("net/sched: sch_qfq: refactor parsing of netlink parameters")
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_qfq.c