summaryrefslogtreecommitdiff
path: root/kernel/bpf/reuseport_array.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-09-01 17:59:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-07 16:23:22 +0200
commitf57004b9d96755cd6a243b51c267be4016b4563c (patch)
tree494fdc556d866c20541fda86e56315013fa6f3ab /kernel/bpf/reuseport_array.c
parent6690986da1e21f3bebe1aaa54a70c636f40343b5 (diff)
usb: gadget: f_fs: stricter integer overflow checks
This from static analysis. The vla_item() takes a size and adds it to the total. It has a built in integer overflow check so if it encounters an integer overflow anywhere then it records the total as SIZE_MAX. However there is an issue here because the "lang_count*(needed_count+1)" multiplication can overflow. Technically the "lang_count + 1" addition could overflow too, but that would be detected and is harmless. Fix both using the new size_add() and size_mul() functions. Fixes: e6f3862fa1ec ("usb: gadget: FunctionFS: Remove VLAIS usage from gadget code") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YxDI3lMYomE7WCjn@kili Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf/reuseport_array.c')
0 files changed, 0 insertions, 0 deletions