Re: [PATCH -net] net: sched: prevent invalid Scell_log shift count

2020-12-28 Thread David Miller
From: Randy Dunlap Date: Thu, 24 Dec 2020 22:23:44 -0800 > 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

[PATCH -net] net: sched: prevent invalid Scell_log shift count

2020-12-24 Thread Randy Dunlap
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: 8afa1