Re: [PATCH bpf-next] libbpf: avoid reading past ELF data section end when copying license

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

 



On Tue, Dec 14, 2021 at 3:21 PM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote:
>
> Fix possible read beyond ELF "license" data section if the license
> string is not properly zero-terminated. Use the fact that libbpf_strlcpy
> never accesses the (N-1)st byte of the source string because it's
> replaced with '\0' anyways.
>
> If this happens, it's a violation of contract between libbpf and a user,
> but not handling this more robustly upsets CIFuzz, so given the fix is
> trivial, let's fix the potential issue.
>
> Fixes: 9fc205b413b3 ("libbpf: Add sane strncpy alternative and use it internally")
> Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

Applied. Thanks



[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