bpf: fix a verifier issue when assigning 32bit reg states to 64bit ones
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: fix a verifier issue when assigning 32bit reg states to 64bit oneskernel/ | +3 | 4 replies | |
| 2/2 | tools/bpf: add a verifier test for assigning 32bit reg states to 64bit onestools/ | +22 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH bpf 0/2] bpf: fix a verifier issue when assigning 32bit reg states to 64bit ones
Commit 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") added 32bit register states to verifier for explicit ALU32 bounds tracking. When assigning 32bit register states to 64bit register states, if 32bit register is a constant value of 0, the 64bit register smax_val will get U32_MAX(0xffffFFFF). Such an inprecise information may impact downward verification. Patch #1 has detailed explanation of the program and how to fix it. Patch #2 provides a verifier test to cover the change.
Yonghong Song (2):
bpf: fix a verifier issue when assigning 32bit reg states to 64bit tools/bpf: add a verifier test for assigning 32bit reg states to 64bit
kernel/bpf/verifier.c | 3 +++ tools/testing/selftests/bpf/verifier/bounds.c | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+)
Signature · 1 line
2.24.1