lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 01 Nov 2023 13:33:50 +0100
From:   Hao Sun <>
To:     Alexei Starovoitov <>,
        Daniel Borkmann <>,
        John Fastabend <>,
        Andrii Nakryiko <>,
        Martin KaFai Lau <>,
        Song Liu <>,
        Yonghong Song <>,
        KP Singh <>,
        Stanislav Fomichev <>,
        Hao Luo <>, Jiri Olsa <>,
        Mykola Lysenko <>, Shuah Khan <>,
        Eduard Zingerman <>,
        Shung-Hsi Yu <>
Cc:,,, Hao Sun <>,
Subject: [PATCH bpf v3 0/2] bpf: Fix incorrect immediate spill

Immediate is incorrectly cast to u32 before being spilled, losing sign
information. The range information is incorrect after load again. Fix
immediate spill by remove the cast. The second patch add a test case
for this.

Signed-off-by: Hao Sun <>
Changes in v3:
- Change the expected log to fix the test case
- Link to v2:

Changes in v2:
- Add fix and cc tags.
- Link to v1:

Hao Sun (2):
      bpf: Fix check_stack_write_fixed_off() to correctly spill imm
      selftests/bpf: Add test for immediate spilled to stack

 kernel/bpf/verifier.c                             |  2 +-
 tools/testing/selftests/bpf/verifier/bpf_st_mem.c | 32 +++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
base-commit: f2fbb908112311423b09cd0d2b4978f174b99585
change-id: 20231026-fix-check-stack-write-c40996694dfa

Best regards,
Hao Sun <>

Powered by blists - more mailing lists