cilium/ebpf v0.9.3 - Prevent livelocks loading BPF programs while profiling

release ·

This is a bugfix release for an endless loop that could occur when running a pprof session while loading a BPF program.

@danobi published an article with a deep-dive into the problem: https://dxuuu.xyz/bpf-go-pprof.html.

If a thread receives a signal while blocked in BPF_PROG_LOAD, the verifier can cooperatively interrupt itself by checking pending signals for the thread and return -EAGAIN from the syscall to request userspace to retry.

During a Go pprof session, threads are routinely sent a SIGPROF to make them dump profiling information, which can lead to a runaway reaction if the program takes longer to verify than the interrupt frequency. To prevent this, the SIGPROF signal is now masked during BPF_PROG_LOAD.

What’s Changed

New Contributors

Full Changelog: https://github.com/cilium/ebpf/compare/v0.9.2...v0.9.3

View source