bpf fix to prevent oob under speculation
Status from this message: Applied, Thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest9 patches 9 repliesApplied
- v29 patches 2 repliesSuperseded
- v19 patches 3 repliesSuperseded
Changes in v3 from the cover letter
- 8/9: change states_equal condition into old->speculative &&
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | bpf: move {prev_,}insn_idx into verifier envinclude/ kernel/ | +40 | 0 replies | |
| 2/9 | bpf: move tmp variable into ax register in interpreterinclude/ kernel/ | +19 | 0 replies | |
| 3/9 | bpf: enable access to ax register also from verifier rewriteinclude/ kernel/ | +21 | 0 replies | |
| 4/9 | bpf: restrict map value pointer arithmetic for unprivilegedkernel/ | +11 | 0 replies | |
| 5/9 | bpf: restrict stack pointer arithmetic for unprivilegedkernel/ | +41 | 0 replies | |
| 6/9 | bpf: restrict unknown scalars of mixed signed bounds for unprivilegedkernel/ | +8 | 0 replies | |
| 7/9 | bpf: fix check_map_access smin_value test when pointer contains offsetkernel/ | +5 | 0 replies | |
| 8/9 | bpf: prevent out of bounds speculation on pointer arithmeticinclude/ kernel/ | +189 | 2 replies | |
| 9/9 | bpf: add various test cases to selfteststools/ | +1124 | 0 replies |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Alexei Starovoitov |
|---|---|
| 1/9 | A-b |
| 2/9 | A-b |
| 3/9 | A-b |
| 4/9 | A-b |
| 5/9 | A-b |
| 6/9 | A-b |
| 7/9 | A-b |
| 8/9 | A-b |
| 9/9 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf v3 0/9] bpf fix to prevent oob under speculation
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!
v2 -> v3:
- 8/9: change states_equal condition into old->speculative &&
!cur->speculative, thanks Jakub!
- 8/9: remove incorrect speculative state test in propagate_liveness(), thanks Jakub!
v1 -> v2:
- Typo fixes in commit msg and a comment, thanks David!
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 unprivileged
bpf: restrict stack pointer arithmetic for unprivileged
bpf: restrict unknown scalars of mixed signed bounds for unprivileged
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 | 336 ++++++-- tools/testing/selftests/bpf/test_verifier.c | 1146 ++++++++++++++++++++++++++- 5 files changed, 1451 insertions(+), 107 deletions(-)
Signature · 1 line
2.9.5