BPF List
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/2] Fix missing process_iter_arg type check
@ 2024-12-03  0:02 Kumar Kartikeya Dwivedi
  2024-12-03  0:02 ` [PATCH bpf v2 1/2] bpf: Ensure reg is PTR_TO_STACK in process_iter_arg Kumar Kartikeya Dwivedi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2024-12-03  0:02 UTC (permalink / raw)
  To: bpf
  Cc: kkd, Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Martin KaFai Lau, Eduard Zingerman, Tao Lyu, Mathias Payer,
	Meng Xu, Sanidhya Kashyap, kernel-team

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-03  2:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03  0:02 [PATCH bpf v2 0/2] Fix missing process_iter_arg type check Kumar Kartikeya Dwivedi
2024-12-03  0:02 ` [PATCH bpf v2 1/2] bpf: Ensure reg is PTR_TO_STACK in process_iter_arg Kumar Kartikeya Dwivedi
2024-12-03  0:02 ` [PATCH bpf v2 2/2] selftests/bpf: Add tests for iter arg check Kumar Kartikeya Dwivedi
2024-12-03  2:00 ` [PATCH bpf v2 0/2] Fix missing process_iter_arg type check patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox