Daniel Borkmann
20182390c4
bpf: fix replace_map_fd_with_map_ptr's ldimm64 second imm field
...
Non-zero imm value in the second part of the ldimm64 instruction for
BPF_PSEUDO_MAP_FD is invalid, and thus must be rejected. The map fd
only ever sits in the first instructions' imm field. None of the BPF
loaders known to us are using it, so risk of regression is minimal.
For clarity and consistency, the few insn->{src_reg,imm} occurrences
are rewritten into insn[0].{src_reg,imm}. Add a test case to the BPF
selftest suite as well.
Fixes: 0246e64d9a ("bpf: handle pseudo BPF_LD_IMM64 insn")
Signed-off-by: Daniel Borkmann <[email protected] >
Acked-by: Song Liu <[email protected] >
Signed-off-by: Alexei Starovoitov <[email protected] >
2019-03-07 08:47:13 -08:00
..
arraymap.c
bpf: introduce BPF_F_LOCK flag
2019-02-01 20:55:39 +01:00
bpf_lru_list.c
bpf_lru_list.h
btf.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-02-08 15:00:17 -08:00
cgroup.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-02-08 15:00:17 -08:00
core.c
bpf: fix u64_stats_init() usage in bpf_prog_alloc()
2019-03-02 00:31:36 +01:00
cpumap.c
bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't
2018-12-20 23:19:12 +01:00
devmap.c
bpf: devmap: fix wrong interface selection in notifier_call
2018-10-26 00:32:21 +02:00
disasm.c
bpf: disassembler support JMP32
2019-01-26 13:33:01 -08:00
disasm.h
hashtab.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-02-08 15:00:17 -08:00
helpers.c
bpf: introduce BPF_F_LOCK flag
2019-02-01 20:55:39 +01:00
inode.c
bpf: decouple btf from seq bpf fs dump and enable more maps
2018-08-13 00:52:45 +02:00
local_storage.c
bpf: introduce BPF_F_LOCK flag
2019-02-01 20:55:39 +01:00
lpm_trie.c
bpf, lpm: fix lookup bug in map_delete_elem
2019-02-22 16:17:53 +01:00
Makefile
bpf: add queue and stack maps
2018-10-19 13:24:31 -07:00
map_in_map.c
bpf: set inner_map_meta->spin_lock_off correctly
2019-02-27 17:03:13 -08:00
map_in_map.h
offload.c
bpf: offload: add priv field for drivers
2019-02-12 17:07:09 +01:00
percpu_freelist.c
bpf: fix lockdep false positive in percpu_freelist
2019-01-31 23:18:21 +01:00
percpu_freelist.h
bpf: fix lockdep false positive in percpu_freelist
2019-01-31 23:18:21 +01:00
queue_stack_maps.c
bpf: fix integer overflow in queue_stack_map
2018-11-22 21:29:40 +01:00
reuseport_array.c
stackmap.c
bpf: fix lockdep false positive in stackmap
2019-02-11 16:36:24 +01:00
syscall.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
2019-03-04 10:14:31 -08:00
tnum.c
verifier.c
bpf: fix replace_map_fd_with_map_ptr's ldimm64 second imm field
2019-03-07 08:47:13 -08:00
xskmap.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-10-19 11:03:06 -07:00