]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Use correct permission flag for mixed signed bounds arithmetic
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Mar 2021 07:32:59 +0000 (08:32 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 16 Apr 2021 21:51:21 +0000 (23:51 +0200)
commit692c8f27ec64c6a4c2c91feb07fbbb0dd97b9f15
tree4b12106c68f6229ce8292b94ad12e790e4ec756d
parent0031fc408b9a92721244a6d8b2c60a6c533fde68
bpf: Use correct permission flag for mixed signed bounds arithmetic

We forbid adding unknown scalars with mixed signed bounds due to the
spectre v1 masking mitigation. Hence this also needs bypass_spec_v1
flag instead of allow_ptr_leaks.

Fixes: 50668119a0f0 ("bpf: Implement CAP_BPF")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c