From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: bpf@vger.kernel.org
Cc: kkd@meta.com, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>, Tao Lyu <tao.lyu@epfl.ch>,
Mathias Payer <mathias.payer@nebelwelt.net>,
Meng Xu <meng.xu.cs@uwaterloo.ca>,
Sanidhya Kashyap <sanidhya.kashyap@epfl.ch>,
kernel-team@fb.com
Subject: [PATCH bpf v2 0/2] Fix missing process_iter_arg type check
Date: Mon, 2 Dec 2024 16:02:36 -0800 [thread overview]
Message-ID: <20241203000238.3602922-1-memxor@gmail.com> (raw)
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
next reply other threads:[~2024-12-03 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 0:02 Kumar Kartikeya Dwivedi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241203000238.3602922-1-memxor@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-team@fb.com \
--cc=kkd@meta.com \
--cc=martin.lau@kernel.org \
--cc=mathias.payer@nebelwelt.net \
--cc=meng.xu.cs@uwaterloo.ca \
--cc=sanidhya.kashyap@epfl.ch \
--cc=tao.lyu@epfl.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox