From: Eduard Zingerman <eddyz87@gmail.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
kkd@meta.com, kernel-team@meta.com
Subject: Re: [PATCH bpf-next v1 1/2] bpf: Fix bounds for bpf_prog_get_file_line linfo loop
Date: Sun, 06 Jul 2025 18:10:29 -0700 [thread overview]
Message-ID: <e36a9cee7bd2cdda3560c8b278ac2591632da3d1.camel@gmail.com> (raw)
In-Reply-To: <20250705053035.3020320-2-memxor@gmail.com>
On Fri, 2025-07-04 at 22:30 -0700, Kumar Kartikeya Dwivedi wrote:
> We may overrun the bounds because linfo and jited_linfo are already
> advanced to prog->aux->linfo_idx, hence we must only iterate the
> remaining elements until we reach prog->aux->nr_linfo. Adjust the
> nr_linfo calculation to fix this. Reported in [0].
>
> [0]: https://lore.kernel.org/bpf/f3527af3b0620ce36e299e97e7532d2555018de2.camel@gmail.com
>
> Reported-by: Eduard Zingerman <eddyz87@gmail.com>
> Fixes: 0e521efaf363 ("bpf: Add function to extract program source info")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> ---
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Nit: It would be nice to extend progs/stream.c, so that e.g.
cond_break exhaustion is reported from a subprogram.
I checked it locally and everything works as expected.
next prev parent reply other threads:[~2025-07-07 1:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-05 5:30 [PATCH bpf-next v1 0/2] BPF Streams - Fixes Kumar Kartikeya Dwivedi
2025-07-05 5:30 ` [PATCH bpf-next v1 1/2] bpf: Fix bounds for bpf_prog_get_file_line linfo loop Kumar Kartikeya Dwivedi
2025-07-07 1:10 ` Eduard Zingerman [this message]
2025-07-05 5:30 ` [PATCH bpf-next v1 2/2] bpf: Fix improper int-to-ptr cast in dump_stack_cb Kumar Kartikeya Dwivedi
2025-07-05 6:14 ` Randy Dunlap
2025-07-07 15:40 ` [PATCH bpf-next v1 0/2] BPF Streams - Fixes 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=e36a9cee7bd2cdda3560c8b278ac2591632da3d1.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=kkd@meta.com \
--cc=martin.lau@kernel.org \
--cc=memxor@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.