bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-98800

—unknown

linux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases

Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.

Reach linux · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

bpf: Wait for an RCU tasks grace period before freeing trampoline progs

When a prog is detached from a trampoline, it is freed after an RCU grace period, or an RCU tasks trace one if it is sleepable. This covers the tasks that are running the prog, since the prog's enter helper takes the matching read lock before the prog is called. On a preemptible kernel, it doesn't cover a task that was preempted in the trampoline just before the enter helper. That task holds no lock yet, and it calls the prog after it was freed:

  BUG: KASAN: vmalloc-out-of-bounds in __bpf_prog_enter_recur+0x3a5/0x3f0
  Read of size 8 at addr ffffc90000055040 by task candidate/110
  CPU: 1 UID: 0 PID: 110 Comm: candidate Not tainted 7.3.0-rc2-00014-g15071f2a1263-dirty #2 PREEMPT(full)
  Call Trace:
   <TASK>
   __bpf_prog_enter_recur+0x3a5/0x3f0
   bpf_trampoline_6442509193+0x37/0xf1
   __x64_sys_futex+0x9/0x410
   do_syscall_64+0xb0/0x530
   ...

Wait for an RCU tasks grace period before the existing one when freeing a prog that was linked to a trampoline. An RCU tasks grace period only ends once the tasks that were preempted have run again, and bpf_tramp_image_put() already relies on it to free the image. It doesn't wait for tasks that sleep in the trampoline, the next commit takes care of those.

Only progs that were linked to a trampoline can be called this way, so bpf_trampoline_add_prog() marks them and other progs are still freed as before.

Published 2026-10-18NVD

References 2
Review Av26.10.0x86_64Not exposedFable 5.2 · medium confidence · 2026-11-19

The vulnerable code is in this build and the fix is not: __bpf_prog_put_noref() in kernel/bpf/syscall.c still frees a prog after only call_rcu() or call_rcu_tasks_trace(), and the kernel is preemptible (CONFIG_PREEMPT=y), which is the condition the CVE needs.

Reaching it is narrow. The kernel has no vmlinux BTF (CONFIG_DEBUG_INFO_BTF is absent, CONFIG_PAHOLE_VERSION=0) and no CONFIG_BPF_LSM, so fentry/fexit/fmod_ret/LSM programs cannot be attached to kernel functions. The one remaining route is a tracing program attached to another BPF program that carries its own BTF, which needs CAP_BPF and CAP_PERFMON.

Nothing in the image loads such programs: libbpf, bpftool, bpftrace and bcc are not selected, and no Infix source or rootfs file uses BPF trampolines. No YANG node or CLI command attaches one, so reaching the code requires a root shell, or root-equivalent code, bringing its own BPF loader. It is not reachable from a network interface.

Evidence 12
  1. Progs are freed after `call_rcu_tasks_trace()` (sleepable) or `call_rcu()` only; there is no RCU tasks grace period for trampoline-linked progs, so the fix is absent.

    output/build/linux-6.18.60/kernel/bpf/syscall.c:2406-2410 (`__bpf_prog_put_noref`)

  2. The link path does not mark progs as trampoline-linked; the only `call_rcu_tasks` uses in the file (lines 293-355) are for the trampoline image, not the prog.

    output/build/linux-6.18.60/kernel/bpf/trampoline.c:553-598 (`__bpf_trampoline_link_prog`)

  3. 139 patches from `patches/linux/6.18.60/`; none has bpf, tramp or rcu in its name, and no file under `patches/linux` mentions trampoline or `bpf_prog_put`.

    output/build/linux-6.18.60/.applied_patches_list

  4. `CONFIG_BPF_SYSCALL=y`, `CONFIG_BPF_JIT=y`, `CONFIG_PREEMPT=y`, `CONFIG_PREEMPTION=y`, `CONFIG_PREEMPT_RCU=y`: the code is built on a preemptible kernel, as the CVE requires.

    output/build/linux-6.18.60/.config:118-119,130,133,158

  5. `kernel/bpf/trampoline.o` and `kernel/bpf/syscall.o` were compiled.

    output/objects.txt:21905,21913

  6. `CONFIG_DYNAMIC_FTRACE=y` and `CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y`: trampoline support is functional on x86_64.

    output/build/linux-6.18.60/.config:4947-4949

  7. `CONFIG_PAHOLE_VERSION=0` and no `CONFIG_DEBUG_INFO_BTF` line anywhere in the file (`lib/Kconfig.debug:382` needs pahole >= 116), so there is no vmlinux BTF. `CONFIG_SECURITY` is off (line 4316), so there is no `CONFIG_BPF_LSM` either.

    output/build/linux-6.18.60/.config:25

  8. Without `CONFIG_DEBUG_INFO_BTF` the vmlinux BTF is NULL, and loading a prog with `attach_btf_id` against the kernel fails with `-EINVAL`: no fentry/fexit/fmod_ret on kernel functions.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:24697 (`bpf_get_btf_vmlinux`) and kernel/bpf/syscall.c:2968-2977

  9. With a target prog the BTF comes from `tgt_prog->aux->btf`, so fentry/fexit on another BPF program stays possible without vmlinux BTF. This is the residual path to `bpf_trampoline_link_prog` (`kernel/bpf/syscall.c:3748`).

    output/build/linux-6.18.60/kernel/bpf/verifier.c:24220 (`bpf_check_attach_target`)

  10. Loading tracing progs needs `CAP_BPF` and `CAP_PERFMON`; `CONFIG_BPF_UNPRIV_DEFAULT_OFF=y`. Privileged callers only.

    output/build/linux-6.18.60/kernel/bpf/syscall.c:2914,2944 and .config:122

  11. `BR2_PACKAGE_BCC`, `BR2_PACKAGE_BPFTOOL`, `BR2_PACKAGE_BPFTRACE` and `BR2_PACKAGE_LIBBPF` are not set. The only BPF-named file in `output/target` is `usr/share/iproute2/bpf_pinning`, and nothing under `board/common/rootfs/etc` references BPF.

    output/.config:614,618,620,659

  12. The container model has `privileged` and capability add/drop leaves. This is the only management-plane way to give third-party code the capabilities needed, and it does not itself load any BPF program.

    src/confd/yang/confd/infix-containers.yang:288,376-385

Version and patches

The tree is plain 6.18.60 (output/build/linux-6.18.60/Makefile:2-4) plus 139 Infix patches, none touching kernel/bpf. The fix described by the CVE (RCU tasks grace period before freeing trampoline-linked progs, marked in the trampoline link path) is not in kernel/bpf/syscall.c or kernel/bpf/trampoline.c. I could not read the upstream commits (0fb5751a6e41, 40955f6512a0) or the CNA's affected range from here, so the fixed stable version is not confirmed; the source check alone shows the vulnerable pattern is present.

Recommendation

No urgent action; document as not exposed in the default product and pick up the fix with the next routine 6.18.y stable bump that contains it, rather than backporting.

The description says a follow-up commit handles tasks that sleep in the trampoline, so take both commits together if a backport is ever wanted.

If containers with privileged set or added capabilities running untrusted images are part of your threat model, treat this as a local kernel use-after-free for such containers and raise the priority accordingly.

Open questions

The upstream fix commits and the CNA affected range were not available offline, so the first fixed 6.18.y release is unknown.

I did not trace the verifier end to end to prove that an fentry/fexit program attached to another BPF program loads successfully without vmlinux BTF. I assumed it does, which is the conservative reading. If it does not, no trampoline can be created at all on this kernel and the finding would be weaker still.

Whether a container configured through infix-containers.yang with privileged or added capabilities actually ends up with CAP_BPF and CAP_PERFMON and an unfiltered bpf() syscall depends on the podman/crun seccomp defaults, which I did not review.

Two of my early compound shell commands were rejected by the sandbox; I re-ran the same checks as separate commands, so nothing was skipped.

Members of Kernel Kit decide. Sign in if you are one.