Re: [PATCH bpf-next 0/5] check bpf_dummy_struct_ops program params for test runs

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

 



Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Tue, 23 Apr 2024 18:28:16 -0700 you wrote:
> When doing BPF_PROG_TEST_RUN for bpf_dummy_struct_ops programs,
> execution should be rejected when NULL is passed for non-nullable
> params, because for such params verifier assumes that such params are
> never NULL and thus might optimize out NULL checks.
> 
> This problem was reported by Jose E. Marchesi in off-list discussion.
> The code generated by GCC for dummy_st_ops_success/test_1() function
> differs from LLVM variant in a way that allows verifier to remove the
> NULL check. The test dummy_st_ops/dummy_init_ret_value actually sets
> the 'state' parameter to NULL, thus GCC-generated version of the test
> triggers NULL pointer dereference when BPF program is executed.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/5] bpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable
    https://git.kernel.org/bpf/bpf-next/c/1479eaff1f16
  - [bpf-next,2/5] selftests/bpf: adjust dummy_st_ops_success to detect additional error
    https://git.kernel.org/bpf/bpf-next/c/3b3b84aacb44
  - [bpf-next,3/5] selftests/bpf: do not pass NULL for non-nullable params in dummy_st_ops
    https://git.kernel.org/bpf/bpf-next/c/f612210d456a
  - [bpf-next,4/5] bpf: check bpf_dummy_struct_ops program params for test runs
    https://git.kernel.org/bpf/bpf-next/c/980ca8ceeae6
  - [bpf-next,5/5] selftests/bpf: dummy_st_ops should reject 0 for non-nullable params
    https://git.kernel.org/bpf/bpf-next/c/6a2d30d3c5bf

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html






[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