mbox series

[bpf,v2,0/2] Fix missing process_iter_arg type check

Message ID 20241203000238.3602922-1-memxor@gmail.com (mailing list archive)
Headers show
Series Fix missing process_iter_arg type check | expand

Message

Kumar Kartikeya Dwivedi Dec. 3, 2024, 12:02 a.m. UTC
I am taking over Tao's earlier patch set that can be found at [0], after
an offline discussion. The bug reported in that thread is that
process_iter_arg missed a reg->type == PTR_TO_STACK check. Fix this by
adding it in, and also address comments from Andrii on the earlier
attempt. Include more selftests to ensure the error is caught.

  [0]: https://lore.kernel.org/bpf/20241107214736.347630-1-tao.lyu@epfl.ch

Changelog:
----------
v1 -> v2:
v1: https://lore.kernel.org/bpf/20241127230147.4158201-1-memxor@gmail.com

 * Rebase on bpf/master (Andrii)

Kumar Kartikeya Dwivedi (1):
  selftests/bpf: Add tests for iter arg check

Tao Lyu (1):
  bpf: Ensure reg is PTR_TO_STACK in process_iter_arg

 kernel/bpf/verifier.c                         |  5 ++++
 tools/testing/selftests/bpf/progs/iters.c     | 26 +++++++++++++++++++
 .../selftests/bpf/progs/verifier_bits_iter.c  |  4 +--
 3 files changed, 33 insertions(+), 2 deletions(-)


base-commit: 537a2525eaf76ea9b0dca62b994500d8670b39d5
--
2.43.5

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 3, 2024, 2 a.m. UTC | #1
Hello:

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

On Mon,  2 Dec 2024 16:02:36 -0800 you wrote:
> I am taking over Tao's earlier patch set that can be found at [0], after
> an offline discussion. The bug reported in that thread is that
> process_iter_arg missed a reg->type == PTR_TO_STACK check. Fix this by
> adding it in, and also address comments from Andrii on the earlier
> attempt. Include more selftests to ensure the error is caught.
> 
>   [0]: https://lore.kernel.org/bpf/20241107214736.347630-1-tao.lyu@epfl.ch
> 
> [...]

Here is the summary with links:
  - [bpf,v2,1/2] bpf: Ensure reg is PTR_TO_STACK in process_iter_arg
    https://git.kernel.org/bpf/bpf/c/12659d28615d
  - [bpf,v2,2/2] selftests/bpf: Add tests for iter arg check
    https://git.kernel.org/bpf/bpf/c/7f71197001e3

You are awesome, thank you!