[PATCH bpf 0/2] bpf: fix a verifier issue when assigning 32bit reg states to 64bit ones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(+)

-- 
2.24.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux