Re: [PATCH bpf-next v1 1/2] bpf: Fix bounds for bpf_prog_get_file_line linfo loop

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

 



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@xxxxxxxxx
> 
> Reported-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
> Fixes: 0e521efaf363 ("bpf: Add function to extract program source info")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
> ---

Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

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.





[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