diff options
author | Eric Dumazet <edumazet@google.com> | 2020-01-06 06:10:39 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2020-04-28 19:03:18 +0100 |
commit | 2641f299648d5cc35eec3d4daa7b586203d3f5bb (patch) | |
tree | d9a4e3d0e77e8522e645b9c02eaac467d2d5ea34 /lib/fdt.c | |
parent | 3facfec87efad82083061633190d06552348fa24 (diff) | |
download | linux-stable-2641f299648d5cc35eec3d4daa7b586203d3f5bb.tar.gz linux-stable-2641f299648d5cc35eec3d4daa7b586203d3f5bb.tar.bz2 linux-stable-2641f299648d5cc35eec3d4daa7b586203d3f5bb.zip |
pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM
commit d9e15a2733067c9328fb56d98fe8e574fa19ec31 upstream.
As diagnosed by Florian :
If TCA_FQ_QUANTUM is set to 0x80000000, fq_deueue()
can loop forever in :
if (f->credit <= 0) {
f->credit += q->quantum;
goto begin;
}
... because f->credit is either 0 or -2147483648.
Let's limit TCA_FQ_QUANTUM to no more than 1 << 20 :
This max value should limit risks of breaking user setups
while fixing this bug.
Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Diagnosed-by: Florian Westphal <fw@strlen.de>
Reported-by: syzbot+dc9071cc5a85950bdfce@syzkaller.appspotmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: Drop call to NL_SET_ERR_MSG_MOD() as extack is
not supported.]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'lib/fdt.c')
0 files changed, 0 insertions, 0 deletions