diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2021-01-20 00:24:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-23 16:03:58 +0100 |
commit | 5f52a8a71b62418d62c736e5aa68aaba0a8da918 (patch) | |
tree | 75c313b7a0aa6a72154729676d3ba2f58c4e108a /crypto | |
parent | 99ea120383b19feb1737c787dc1c8b35ce630fc5 (diff) | |
download | linux-stable-5f52a8a71b62418d62c736e5aa68aaba0a8da918.tar.gz linux-stable-5f52a8a71b62418d62c736e5aa68aaba0a8da918.tar.bz2 linux-stable-5f52a8a71b62418d62c736e5aa68aaba0a8da918.zip |
bpf: Fix signed_{sub,add32}_overflows type handling
commit bc895e8b2a64e502fbba72748d59618272052a8b upstream.
Fix incorrect signed_{sub,add32}_overflows() input types (and a related buggy
comment). It looks like this might have slipped in via copy/paste issue, also
given prior to 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking")
the signature of signed_sub_overflows() had s64 a and s64 b as its input args
whereas now they are truncated to s32. Thus restore proper types. Also, the case
of signed_add32_overflows() is not consistent to signed_sub32_overflows(). Both
have s32 as inputs, therefore align the former.
Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking")
Reported-by: De4dCr0w <sa516203@mail.ustc.edu.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions