1. 07 11月, 2015 2 次提交
  2. 03 10月, 2015 1 次提交
  3. 26 6月, 2015 1 次提交
  4. 25 6月, 2015 1 次提交
    • X
      arm64: bpf: fix out-of-bounds read in bpf2a64_offset() · 8eee539d
      Xi Wang 提交于
      Problems occur when bpf_to or bpf_from has value prog->len - 1 (e.g.,
      "Very long jump backwards" in test_bpf where the last instruction is a
      jump): since ctx->offset has length prog->len, ctx->offset[bpf_to + 1]
      or ctx->offset[bpf_from + 1] will cause an out-of-bounds read, leading
      to a bogus jump offset and kernel panic.
      
      This patch moves updating ctx->offset to after calling build_insn(),
      and changes indexing to use bpf_to and bpf_from without + 1.
      
      Fixes: e54bcde3 ("arm64: eBPF JIT compiler")
      Cc: <stable@vger.kernel.org> # 3.18+
      Cc: Zi Shen Lim <zlim.lnx@gmail.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      8eee539d
  5. 08 5月, 2015 1 次提交
    • X
      arm64: bpf: fix signedness bug in loading 64-bit immediate · 1e4df6b7
      Xi Wang 提交于
      Consider "(u64)insn1.imm << 32 | imm" in the arm64 JIT.  Since imm is
      signed 32-bit, it is sign-extended to 64-bit, losing the high 32 bits.
      The fix is to convert imm to u32 first, which will be zero-extended to
      u64 implicitly.
      
      Cc: Zi Shen Lim <zlim.lnx@gmail.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: <stable@vger.kernel.org>
      Fixes: 30d3d94c ("arm64: bpf: add 'load 64-bit immediate' instruction")
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      [will: removed non-arm64 bits and redundant casting]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      1e4df6b7
  6. 04 12月, 2014 1 次提交
  7. 21 10月, 2014 4 次提交
  8. 12 9月, 2014 1 次提交
  9. 08 9月, 2014 1 次提交