On Tue, Jan 14, 2020 at 10:35 PM Benjamin Nilsen <bcnilsen@xxxxxxxxxxx> wrote: > > Hello, > > I believe I found some bugs with libbpf and just wanted to share them here. > I have attached them below. > > Regards, > Ben > > > The first one: > I believe there is an error with: libbpf_nla_dump_errormsg(); > > The second one: > libbpf_nla_parse(); Can you please expand on what the bugs are, specifically? It will help direct libbpf developer's attention to fixing bugs, thanks. > > Third one: > I believe there is a stack buffer overflow with the method > bpf_object__open_buffer() when running the attached program with the > input: > ./LibbpfTest15.c (executable version) LibbpfTest15buginput LibbpfTest15buginput Yyou code calls bpf_object__load() unconditionally, even if bpf_object__open_buffer fails (which it obviously does in this case, as you are giving it a random 5 bytes as an ELF file). Again, there might be bugs, but please be more specific.