]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix swapped arguments in calls to check_buffer_access
authorColin Ian King <colin.king@canonical.com>
Mon, 27 Jul 2020 17:54:11 +0000 (18:54 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Jul 2020 10:40:10 +0000 (12:40 +0200)
commitc0f5f5db3bf365c6587e98245b22bf5c67299556
tree1172b5424e4e6ff8e0b8a447a0718762641b3ba3
parent6b26a5a6b093ee9ca5b211429b9a6ecd3db381bd
bpf: Fix swapped arguments in calls to check_buffer_access

There are a couple of arguments of the boolean flag zero_size_allowed and
the char pointer buf_info when calling to function check_buffer_access that
are swapped by mistake. Fix these by swapping them to correct the argument
ordering.

Fixes: 7587aca13c9e ("bpf: Support readonly/readwrite buffers in verifier")
Addresses-Coverity: ("Array compared to 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200727175411.155179-1-colin.king@canonical.com
kernel/bpf/verifier.c