Closed sta-c0000 closed 3 months ago
Hi, and thanks for the report! Yes, this sounds very much like the bug we fixed upstream with the patch you found. Have you tried to reproduce with the latest bpftool version? You can compile from the kernel repo or from this GitHub repo. I think that even the 7.4 release binaries from this repo should contain the fix.
not in any stable kernels yet
It was queued today for both 6.8 and 6.9 branches, I got Greg's emails less than 2 hours ago. But ideally distributions should package from this GitHub repo instead, this would avoid this sort of issues.
My apologies, I should have spent more time searching (to find that patch that is now coming down the pipes) and testing: yes, the release binary here works! Thank you for your time.
Hello, Starting with
bpftool:amd64 7.4.0+6.8.9-1
on Debian unstable (now7.4.0+6.8.11-1
)bpftool
began crashing with a segmentation fault and core-dump when attempting to load a simple bpf program.Now it works if I re-compile the bpf object file with
-g
(debug info). However the old bpf object file had been working for a few years on multiple linux versions /arches. Must all bpf programs be compiled with-g
now? It makes the file much larger. Perhapsprog load
should still not core-dump and return a message instead?If curious, here is the bpf object file: so_mark_giduid.bpf.o
Thank you.
Edit: add minimal reproduction,
minimal.bpf.c
:Edit 2: possibly related to: [PATCH bpf-next v2] libbpf: Prevent null-pointer dereference when prog to load has no BTF ...not in any stable kernels yet (neither
6.8.11
nor6.9.2
at time of writing)