diff options
author | David S. Miller <davem@davemloft.net> | 2017-06-30 12:43:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-30 12:43:08 -0400 |
commit | b07911593719828cac023bdcf6bf4da1c9ba546f (patch) | |
tree | c4d2f66e6f2506e5b5439ffca0449e646f677b33 /kernel/bpf/verifier.c | |
parent | 52a623bd6189b6ea8f06a0d7594c7604deaab24a (diff) | |
parent | 4d8a991d460d4fa4829beaffdcba45a217ca0fa7 (diff) | |
download | talos-op-linux-b07911593719828cac023bdcf6bf4da1c9ba546f.tar.gz talos-op-linux-b07911593719828cac023bdcf6bf4da1c9ba546f.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A set of overlapping changes in macvlan and the rocker
driver, nothing serious.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r-- | kernel/bpf/verifier.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 74ea96ea391b..6ea2adcb233b 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1016,6 +1016,11 @@ static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_ins if (err) return err; + if (is_pointer_value(env, insn->src_reg)) { + verbose("R%d leaks addr into mem\n", insn->src_reg); + return -EACCES; + } + /* check whether atomic_add can read the memory */ err = check_mem_access(env, insn_idx, insn->dst_reg, insn->off, BPF_SIZE(insn->code), BPF_READ, -1); |