#1144636 libbpf1: libbpf unable to parse debian kernel version

Package:
libbpf1
Source:
libbpf1
Description:
eBPF helper library (shared library)
Submitter:
richardn
Date:
2026-08-17 13:15:02 UTC
Severity:
normal
#1144636#5
Date:
2026-08-17 13:13:20 UTC
From:
To:
Using latest linux kernel from experimental package linux-image-7.2-amd64

~$ uname -v
#1 SMP PREEMPT_DYNAMIC Debian 7.2~rc7-1~exp1 (2026-08-11)
~$ uname -r
7.2-amd64

The format of the kernel version is not compatible with what libbpf expects.

In libbpf_probes.c get_kernel_version() which is called from bpf_object__resolve_externs()

get_debian_kernel_version() is not able to parse info->version, which contains

#1 SMP PREEMPT_DYNAMIC Debian 7.2~rc7-1~exp1 (2026-08-11)

and after that fails, neither is get_kernel_version() able to parse info.release, which contains

7.2-amd64

Both are expecting three numbers for major, minor, patch

This means, for example, bpftune is unable to load all tuners. With trace enabled, it shows -

bpftune: libbpf: loaded kernel BTF from '/sys/kernel/btf/vmlinux'
bpftune: libbpf: extern (kcfg) 'LINUX_KERNEL_VERSION': failed to get kernel version
bpftune: libbpf: failed to load BPF skeleton 'tcp_buffer_tuner_bpf': -EINVAL
bpftune: BPF load for tuner 'tcp_buffer; failed: 'Invalid argument': Invalid argument

Same problem has happened before, for example with

#1 SMP PREEMPT_DYNAMIC Debian 7.1~rc2-1~exp1 (2026-05
-07)

7.1-amd64

but I didn't notice it at the time.