]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - kernel/bpf/verifier.c
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)
commitf6dfbe31e8fa5cbd5bc89df9d7f0fa0af7e69981
tree1172b5424e4e6ff8e0b8a447a0718762641b3ba3
parent363885d7c62e293fb093c7c355bf5f05fa0a25a9
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: afbf21dce668 ("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