]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
authorCong Wang <xiyou.wangcong@gmail.com>
Sun, 8 Sep 2019 20:40:51 +0000 (13:40 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commite0e0a20743900a12659a86f8d288884f77394d77
treec06d954171065ca41f658740f792ed249d5d1e32
parentcf07b28d87578ac5c8e81d29422675f86e4be83b
sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero

BugLink: https://bugs.launchpad.net/bugs/1845266
[ Upstream commit d4d6ec6dac07f263f06d847d6f732d6855522845 ]

In case of TCA_HHF_NON_HH_WEIGHT or TCA_HHF_QUANTUM is zero,
it would make no progress inside the loop in hhf_dequeue() thus
kernel would get stuck.

Fix this by checking this corner case in hhf_change().

Fixes: 10239edf86f1 ("net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc")
Reported-by: syzbot+bc6297c11f19ee807dc2@syzkaller.appspotmail.com
Reported-by: syzbot+041483004a7f45f1f20a@syzkaller.appspotmail.com
Reported-by: syzbot+55be5f513bed37fc4367@syzkaller.appspotmail.com
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Terry Lam <vtlam@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/sched/sch_hhf.c