Re: Question about possible NULL dereference in linker.c

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

 



I think yes, we already checked dst_sym here:
https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next/+/refs/heads/master/tools/lib/bpf/linker.c#2154

```
if (!dst_sym)
return -ENOMEM;
```

вт, 18 февр. 2025 г. в 22:45, Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>:
>
> On Tue, Feb 18, 2025 at 2:19 AM Egor Egor <xwooffie@xxxxxxxxx> wrote:
> >
> > In this line we assume that dst_sec can be NULL:
> >
> > https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next/+/refs/heads/master/tools/lib/bpf/linker.c#2160
> >
> > But after we use it without check:
> >
> > https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next/+/refs/heads/master/tools/lib/bpf/linker.c#2167
>
> Andrii,
>
> back in commit faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
> && dst_sym)
>
> should have been
> && dst_sec)
>
> ?





[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