BPF fixes for CVE-2021-3444 and CVE-2021-3600
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 1 replyIn review
- v24 patches 4 repliesSuperseded
Changes in v3 from the cover letter
Added upstream commit hash from 4.19.y and added detail to changelog.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpf: Do not use ax register in interpreter on div/modkernel/ | +14 | 0 replies | |
| 2/4 | bpf: fix subprog verifier bypass by div/mod by 0 exceptionkernel/ kernel/ net/ | +38 | 0 replies | |
| 3/4 | bpf: Fix 32 bit src register truncation on div/modinclude/ kernel/ | +35 | 0 replies | |
| 4/4 | bpf: Fix truncation handling for mod32 dst reg wrt zerokernel/ | +5 | 0 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | John Fastabend | Alexei Starovoitov | Salvatore Bonaccorso |
|---|---|---|---|
| 1/4 | R-b | ||
| 2/4 | A-b | ||
| 3/4 | T-b | ||
| 4/4 | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 4.14 v3 0/4] BPF fixes for CVE-2021-3444 and CVE-2021-3600
Thadeu Lima de Souza Cascardo originally sent this patch but it failed to merge because of a compilation error:
https://lore.kernel.org/bpf/[email protected]/T/
v3:
Added upstream commit hash from 4.19.y and added detail to changelog.
v2:
Removed redefinition of tmp to fix compilation with CONFIG_BPF_JIT_ALWAYS_ON enabled.
-Edward
==
The upstream changes necessary to fix these CVEs rely on the presence of JMP32, which is not a small backport and brings its own potential set of necessary follow-ups.
Daniel Borkmann, John Fastabend and Alexei Starovoitov came up with a fix involving the use of the AX register.
This has been tested against the test_verifier in 4.14.y tree and some tests specific to the two referred CVEs. The test_bpf module was also tested.
Daniel Borkmann (4):
bpf: Do not use ax register in interpreter on div/mod
bpf: fix subprog verifier bypass by div/mod by 0 exception
bpf: Fix 32 bit src register truncation on div/mod
bpf: Fix truncation handling for mod32 dst reg wrt zero
include/linux/filter.h | 24 ++++++++++++++++++++++++ kernel/bpf/core.c | 39 ++++++++++++++------------------------- kernel/bpf/verifier.c | 39 +++++++++++++++++++++++++++++++-------- net/core/filter.c | 9 ++++++++- 4 files changed, 77 insertions(+), 34 deletions(-)
base-commit: a8ad60f2af5884921167e8cede5784c7849884b2
Signature · 1 line
2.39.2.637.g21b0678d19-goog