android_kernel_sony_sdm845/kernel/bpf
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Borkmann b984811672 bpf: Fix buggy rsh min/max bounds tracking
[ no upstream commit ]

Fix incorrect bounds tracking for RSH opcode. Commit f23cc643f9 ("bpf: fix
range arithmetic for bpf map access") had a wrong assumption about min/max
bounds. The new dst_reg->min_value needs to be derived by right shifting the
max_val bounds, not min_val, and likewise new dst_reg->max_value needs to be
derived by right shifting the min_val bounds, not max_val. Later stable kernels
than 4.9 are not affected since bounds tracking was overall reworked and they
already track this similarly as in the fix.

Fixes: f23cc643f9 ("bpf: fix range arithmetic for bpf map access")
Reported-by: Ryota Shiga (Flatt Security)
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Cc: Josef Bacik <jbacik@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-30 13:27:15 +01:00
..
arraymap.c bpf: map_get_next_key to return first key on NULL 2018-05-09 09:50:19 +02:00
core.c bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K 2019-08-25 10:51:50 +02:00
hashtab.c bpf: Remove recursion prevention from rcu free callback 2020-10-01 20:40:08 +02:00
helpers.c bpf: direct packet write and access for helpers for clsact progs 2016-09-20 23:32:11 -04:00
inode.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
Makefile bpf: silence warning messages in core 2019-08-04 09:33:19 +02:00
percpu_freelist.c bpf: fix lockdep splat 2017-12-14 09:28:23 +01:00
percpu_freelist.h bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
stackmap.c bpf: fix wrong exposure of map_flags into fdinfo for lpm 2018-03-11 16:21:34 +01:00
syscall.c bpf: Explicitly memset the bpf_attr structure 2020-04-02 17:20:40 +02:00
verifier.c bpf: Fix buggy rsh min/max bounds tracking 2021-01-30 13:27:15 +01:00