Randy Dunlap bd1248f1dd net: sched: prevent invalid Scell_log shift count
Check Scell_log shift size in red_check_params() and modify all callers
of red_check_params() to pass Scell_log.

This prevents a shift out-of-bounds as detected by UBSAN:
  UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22
  shift exponent 72 is too large for 32-bit type 'int'

Fixes: 8afa10cbe281 ("net_sched: red: Avoid illegal values")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: syzbot+97c5bd9cc81eca63d36e@syzkaller.appspotmail.com
Cc: Nogah Frankel <nogahf@mellanox.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-12-28 14:52:54 -08:00
..
2019-01-23 11:18:00 -08:00
2020-11-24 12:14:56 -08:00
2020-11-03 12:55:53 -08:00
2020-05-05 13:23:29 -07:00
2019-12-09 10:36:44 -08:00
2020-06-22 21:12:44 -07:00
2020-08-31 23:06:51 +02:00
2020-11-10 17:56:54 -08:00
2019-12-09 10:36:44 -08:00
2020-12-15 13:22:29 -08:00
2020-03-04 13:25:55 -08:00
2019-04-22 21:47:25 -07:00
2020-12-15 13:22:29 -08:00
2019-10-05 16:29:00 -07:00
2020-12-15 13:22:29 -08:00
2020-06-18 20:46:23 -07:00
2019-12-09 10:28:43 -08:00