bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-98599

—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: Reject non-negative offsets in stack_slot_obj_get_spi()

bpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division, which truncates toward zero. For off == 0, this produces spi 0, the same index used by the valid stack slot at fp-8.

stack_slot_obj_get_spi() currently checks alignment and the resulting spi bounds, but does not reject the non-negative offset itself. It can therefore validate a PTR_TO_STACK register holding fp+0 against an iterator stored at fp-8 even though the runtime receives the actual fp+0 pointer. An effectful iterator kfunc can then interpret memory outside the BPF stack as iterator state.

Reject non-negative offsets before converting the offset to an spi. All valid stack objects begin at a negative offset from the frame pointer.

Published 2026-10-18NVD

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

The unfixed stack_slot_obj_get_spi() is compiled into this kernel: it has no check rejecting a non-negative offset, and none of the 139 applied patches touches BPF. The package is the target kernel and kernel/bpf/verifier.o is built.

The flaw cannot be reached on this build. It needs a single-slot stack object (an iterator or IRQ flag), and those are only passed through kfunc calls. The verifier refuses every kfunc call when there is no vmlinux BTF, and this kernel is built without CONFIG_DEBUG_INFO_BTF. The other caller, dynptr, uses two slots, and offset 0 is already rejected there by the existing spi + 1 < nr_slots check.

Reaching it would take a rebuilt kernel with BTF enabled plus a root shell with CAP_BPF to load a crafted program. Unprivileged BPF is off by default (CONFIG_BPF_UNPRIV_DEFAULT_OFF=y), no BPF loader (bpftool, libbpf, bpftrace) is in the image, and I found no BPF reference in the rootfs overlay or src/confd/. It is not reachable from a network interface.

Evidence 12
  1. Only checks constant offset, alignment, `spi + 1 < nr_slots` and `is_spi_bounds_valid()`; there is no rejection of `off >= 0`, so the fix is not present.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:662-687 (stack_slot_obj_get_spi)

  2. `(-off - 1) / BPF_REG_SIZE` truncates toward zero, so offset 0 gives spi 0, as the CVE describes.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:635-638 (__get_spi)

  3. `kernel/bpf/verifier.o` was built, so the function is in the image.

    output/objects.txt:21936

  4. `CONFIG_BPF_SYSCALL=y` (also set in `board/x86_64/linux_defconfig:6`), which builds the verifier.

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

  5. `CONFIG_PAHOLE_VERSION=0`, and the file contains no line mentioning BTF at all; `CONFIG_DEBUG_INFO_BTF` depends on `PAHOLE_VERSION >= 116` (`lib/Kconfig.debug:377-382`), so it is off.

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

  6. vmlinux BTF is only parsed when `IS_ENABLED(CONFIG_DEBUG_INFO_BTF)`, so `btf_vmlinux` stays NULL on this build.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:24697 (bpf_get_btf_vmlinux)

  7. With `btf_vmlinux` NULL, any kfunc call is rejected with "calling kernel function is not supported without CONFIG_DEBUG_INFO_BTF" (`-ENOTSUPP`).

    output/build/linux-6.18.60/kernel/bpf/verifier.c:3347-3350 (add_kfunc_call)

  8. `process_iter_arg()` and `process_irq_flag()`, the single-slot users of `stack_slot_obj_get_spi()`, are only called from kfunc argument checking.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:13703 and :13898 (check_kfunc_args)

  9. The dynptr caller passes `BPF_DYNPTR_NR_SLOTS` (2, `include/linux/bpf_verifier.h:233`); at offset 0 spi is 0 and `spi + 1 < 2` already rejects it.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:691 (dynptr_get_spi)

  10. `CONFIG_BPF_UNPRIV_DEFAULT_OFF=y`; program load then requires `CAP_BPF` (`kernel/bpf/syscall.c:2929`).

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

  11. `BR2_PACKAGE_BPFTOOL`, `BR2_PACKAGE_BPFTRACE`, `BR2_PACKAGE_LIBBPF` and `BR2_PACKAGE_LINUX_TOOLS_BPFTOOL` are not set; no BPF loader ships in the image.

    output/.config:618-620, 659, 4467

  12. 139 patches applied, none with `bpf` or `verifier` in the name; no file under `patches/` mentions `stack_slot_obj_get_spi`.

    output/build/linux-6.18.60/.applied_patches_list

Version and patches

The 6.18.60 source in output/build/linux-6.18.60/kernel/bpf/verifier.c does not contain the fix, and no applied patch adds it. I could not confirm the affected range or the fixed stable version: the upstream commits (79a9172f3ab4, 89a7241fc7ec) are not available in this tree and the NVD record is still in Received status.

Recommendation

Document as not exposed on this build; no urgent backport is needed.

Pick up the fix through the next routine 6.18.y stable bump that includes it. Re-evaluate if CONFIG_DEBUG_INFO_BTF is ever enabled (for example to support bpftrace or CO-RE tooling), because that makes the iterator kfunc path reachable to anyone with CAP_BPF.

Open questions

Which 6.18.y release carries the fix: the upstream commits could not be read from this tree.

The search for BPF users in board/common/rootfs, src/confd/ and package/ returned nothing, and iproute2 (BR2_PACKAGE_IPROUTE2=y) can load tc BPF objects as root. Neither changes the verdict, since kfunc calls are refused without BTF regardless of who loads the program.

Only the x86_64 kernel config was reviewed; other Infix board configs were not checked for CONFIG_DEBUG_INFO_BTF.

Confidence is medium because the kfunc-only reachability argument rests on reading the verifier call sites, not on the upstream advisory.

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