Skip to content

bpf: verifier security fixes

Alexei Starovoitov netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9bpf/verifier: fix bounds calculation on BPF_RSHkernel/bpf/verifier.c+16 -140 replies
2/9bpf: fix incorrect sign extension in check_alu_op()kernel/bpf/verifier.c+7 -10 replies
3/9bpf: fix incorrect tracking of register size truncationkernel/bpf/verifier.c+27 -170 replies
4/9bpf: fix 32-bit ALU op verificationkernel/bpf/verifier.c+17 -110 replies
5/9bpf: fix missing error return in check_stack_boundary()kernel/bpf/verifier.c+1 -00 replies
6/9bpf: force strict alignment checks for stack pointerskernel/bpf/verifier.c+5 -00 replies
7/9bpf: don't prune branches when a scalar is replaced with a pointerkernel/bpf/verifier.c+7 -80 replies
8/9bpf: fix integer overflowsinclude/linux/bpf_verifier.h kernel/bpf/verifier.c+50 -22 replies
9/9selftests/bpf: add tests for recent bugfixestools/testing/selftests/bpf/test_verifier.c+533 -160 replies

Reviews trailers per patch

3 of 9 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovEdward Cree
1/9A-b
2/9A-b
3/9A-b
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf 0/9] bpf: verifier security fixes

This patch set addresses a set of security vulnerabilities in bpf verifier logic discovered by Jann Horn. All of the patches are candidates for 4.14 stable.

Alexei Starovoitov (1):
bpf: fix integer overflows

Edward Cree (1):
bpf/verifier: fix bounds calculation on BPF_RSH

Jann Horn (7):
bpf: fix incorrect sign extension in check_alu_op()
bpf: fix incorrect tracking of register size truncation
bpf: fix 32-bit ALU op verification
bpf: fix missing error return in check_stack_boundary()
bpf: force strict alignment checks for stack pointers
bpf: don't prune branches when a scalar is replaced with a pointer selftests/bpf: add tests for recent bugfixes

 include/linux/bpf_verifier.h                |   4 +-
 kernel/bpf/verifier.c                       | 175 ++++++---
 tools/testing/selftests/bpf/test_verifier.c | 549 +++++++++++++++++++++++++++-
 3 files changed, 661 insertions(+), 67 deletions(-)
Signature · 1 line
2.9.5