netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: ast@kernel.org
Cc: jannh@google.com, netdev@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH bpf 0/9] bpf fix to prevent oob under speculation
Date: Tue,  1 Jan 2019 21:49:16 +0100	[thread overview]
Message-ID: <20190101204925.4584-1-daniel@iogearbox.net> (raw)

This set fixes an out of bounds case under speculative execution
by implementing masking of pointer alu into the verifier. For
details please see the individual patches.

Thanks!

Daniel Borkmann (9):
  bpf: move {prev_,}insn_idx into verifier env
  bpf: move tmp variable into ax register in interpreter
  bpf: enable access to ax register also from verifier rewrite
  bpf: restrict map value pointer arithmetic for unpriviledged
  bpf: restrict stack pointer arithmetic for unpriviledged
  bpf: restrict unknown scalars of mixed signed bounds for unpriviledged
  bpf: fix check_map_access smin_value test when pointer contains offset
  bpf: prevent out of bounds speculation on pointer arithmetic
  bpf: add various test cases to selftests

 include/linux/bpf_verifier.h                |   12 +
 include/linux/filter.h                      |   10 +-
 kernel/bpf/core.c                           |   54 +-
 kernel/bpf/verifier.c                       |  342 ++++++--
 tools/testing/selftests/bpf/test_verifier.c | 1146 ++++++++++++++++++++++++++-
 5 files changed, 1457 insertions(+), 107 deletions(-)

-- 
2.9.5

             reply	other threads:[~2019-01-01 20:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01 20:49 Daniel Borkmann [this message]
2019-01-01 20:49 ` [PATCH bpf 1/9] bpf: move {prev_,}insn_idx into verifier env Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 2/9] bpf: move tmp variable into ax register in interpreter Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 3/9] bpf: enable access to ax register also from verifier rewrite Daniel Borkmann
2019-01-01 21:17   ` David Miller
2019-01-01 20:49 ` [PATCH bpf 4/9] bpf: restrict map value pointer arithmetic for unpriviledged Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 5/9] bpf: restrict stack " Daniel Borkmann
2019-01-01 21:20   ` David Miller
2019-01-01 22:57     ` Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 6/9] bpf: restrict unknown scalars of mixed signed bounds " Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 7/9] bpf: fix check_map_access smin_value test when pointer contains offset Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 8/9] bpf: prevent out of bounds speculation on pointer arithmetic Daniel Borkmann
2019-01-01 20:49 ` [PATCH bpf 9/9] bpf: add various test cases to selftests Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190101204925.4584-1-daniel@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=jannh@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).