mbox series

[bpf,0/2] bpf fix to reject mixing ptr / scalar alu op on unpriv

Message ID 20190105235438.5944-1-daniel@iogearbox.net
Headers show
Series bpf fix to reject mixing ptr / scalar alu op on unpriv | expand

Message

Daniel Borkmann Jan. 5, 2019, 11:54 p.m. UTC
Follow-up fix to 979d63d50c0c ("bpf: prevent out of bounds speculation
on pointer arithmetic") in order to reject a corner case for sanitation
when ptr / scalars are mixed in the same alu op.

Thanks!

Daniel Borkmann (2):
  bpf: fix sanitation of alu op with pointer / scalar type from different paths
  bpf: add various test cases for alu op on mixed dst register types

 include/linux/bpf_verifier.h                |   1 +
 kernel/bpf/verifier.c                       |  61 +++++++++++---
 tools/testing/selftests/bpf/test_verifier.c | 120 ++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+), 13 deletions(-)

Comments

Alexei Starovoitov Jan. 6, 2019, 5:34 a.m. UTC | #1
On Sun, Jan 06, 2019 at 12:54:36AM +0100, Daniel Borkmann wrote:
> Follow-up fix to 979d63d50c0c ("bpf: prevent out of bounds speculation
> on pointer arithmetic") in order to reject a corner case for sanitation
> when ptr / scalars are mixed in the same alu op.

Applied, Thanks