bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-74314

7.8high

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: Cancel special fields on map value recycle

Map update and delete paths currently call bpf_obj_free_fields() when a value is being replaced or recycled. That makes field destruction depend on the context of the update/delete operation. For tracing programs this can include NMI context, where referenced kptr destructors, uptr unpinning, and graph root destruction are not generally safe.

Introduce bpf_obj_cancel_fields() for the reusable-value path. It only performs NMI-safe cleanup for timer, workqueue, and task_work fields. Fields that need full destruction are left attached to the recycled value and are destroyed by the final cleanup path instead.

Switch array and hashtab update/delete/recycle paths to this cancel helper. Keep bpf_obj_free_fields() for final map destruction and for bpf_mem_alloc destructors. Preallocated hashtabs do not have allocator destructors, so teardown continues to walk the normal and extra elements and fully destroy their fields.

This deliberately relaxes the eager-free semantics of map update/delete for special fields. Programs that relied on a recycled map slot becoming empty immediately after update/delete were relying on behavior that cannot be implemented safely from every BPF execution context without offloading arbitrary destructors.

There is a chance this change breaks programs making assumptions regarding the eager freeing of fields. If so, we can relax semantics to cancellation only when irqs_disabled() is true in the future. However, theoretically, map values that get reused eagerly already have weaker guarantees as parallel users can recreate freed fields before the new element becomes visible again.

Published 2026-08-15NVD

CVSS 3.1Local · low privileges · no user interaction

How it is reached

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None

What it costs

Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References 2
Review Bv26.10.0x86_64Not exposed✓ accepted by a member, 2026-11-20 · settles 4 of 8

Fable 5.2 · medium confidence · 2026-11-19

The fix is not in this tree: bpf_obj_cancel_fields() does not exist anywhere under output/build/linux-6.18.60/kernel/bpf/, and the array and hashtab update/recycle paths still call bpf_obj_free_fields(). The affected files are compiled in (CONFIG_BPF_SYSCALL=y), so the build is affected.

Reaching the code needs someone to load a custom BPF program plus a map whose value carries special fields, which takes CAP_BPF/CAP_SYS_ADMIN (CONFIG_BPF_UNPRIV_DEFAULT_OFF=y). Nothing in the default image does this: no BPF loader (bpftool, libbpf, bpftrace, bcc) is selected, and I found no BPF use in board/, src/ or package/. No YANG node or CLI command loads BPF programs, so this is case (c): it requires a root shell or equivalent with a self-supplied loader.

The build also has no vmlinux BTF (CONFIG_DEBUG_INFO_BTF is absent, CONFIG_PAHOLE_VERSION=0), so bpf_find_btf_id() returns -EINVAL and kptr fields in map values are rejected at map creation. That removes the kptr-destructor part of the CVE; I did not trace whether the list/rbtree-root part is equally blocked. Not reachable from a network interface.

Evidence 11
  1. `array_map_update_elem()` still calls `bpf_obj_free_fields()` on the replaced value; the fix would switch this to `bpf_obj_cancel_fields()`.

    output/build/linux-6.18.60/kernel/bpf/arraymap.c:383,391

  2. The hashtab recycle/delete helper still calls `bpf_obj_free_fields()` for both per-CPU and normal elements.

    output/build/linux-6.18.60/kernel/bpf/hashtab.c:856-873 (check_and_free_fields)

  3. Full destruction (kptr dtor, `unpin_uptr_kaddr`, `bpf_list_head_free`, `bpf_rb_root_free`) is the only helper; a grep for `bpf_obj_cancel_fields` in `kernel/bpf/` and `include/linux/bpf.h` returns nothing.

    output/build/linux-6.18.60/kernel/bpf/syscall.c:812-879 (bpf_obj_free_fields)

  4. 139 patches applied; none matches `bpf`, `hashtab`, `arraymap` or `kptr`, so no local backport of the fix.

    output/build/linux-6.18.60/.applied_patches_list

  5. `CONFIG_BPF_SYSCALL=y` (affected code built) and `CONFIG_BPF_UNPRIV_DEFAULT_OFF=y` (unprivileged users cannot use `bpf()` by default).

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

  6. `kernel/bpf/syscall.o`, `arraymap.o` and `hashtab.o` were produced by the build.

    output/objects.txt:21913,21918,21950

  7. `CONFIG_PERF_EVENTS=y`, `CONFIG_KPROBES=y`, `CONFIG_KPROBE_EVENTS=y`, `CONFIG_BPF_EVENTS=y`: tracing/perf BPF program types (the NMI-context case) are available to a privileged loader.

    output/build/linux-6.18.60/.config:294,696,4967,4971

  8. `CONFIG_PAHOLE_VERSION=0` and no `CONFIG_DEBUG_INFO_BTF` line at all: the kernel is built without vmlinux BTF.

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

  9. Without `CONFIG_DEBUG_INFO_BTF`, `bpf_get_btf_vmlinux()` returns NULL, `bpf_find_btf_id()` returns `-EINVAL`, and `btf_parse_kptr()` fails, so maps with kptr fields cannot be created on this build.

    output/build/linux-6.18.60/kernel/bpf/verifier.c:24692-24713 and kernel/bpf/btf.c:567-577, 3826-3841

  10. `BR2_PACKAGE_BCC`, `BR2_PACKAGE_BPFTOOL`, `BR2_PACKAGE_BPFTRACE`, `BR2_PACKAGE_LIBBPF` and `BR2_PACKAGE_LINUX_TOOLS_BPFTOOL` are all unset: no BPF loader ships in the image.

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

  11. The only management-interface route to the needed capabilities is `leaf privileged` on a container, which only helps if the operator also supplies an image containing a BPF loader; no YANG node loads BPF itself.

    src/confd/yang/confd/infix-containers.yang:288

Version and patches

The tree is 6.18.60 (output/build/linux-6.18.60/Makefile: SUBLEVEL = 60) and does not contain the fix: no bpf_obj_cancel_fields() and none of the 139 applied patches touches BPF. I had no network access, so I could not read the upstream fix commits (9ea734e2cc01, a3a81d247651) or confirm which stable release first carries them; NVD status is still "Received" with no range to compare against.

Recommendation

No urgent backport is needed; document as not exposed in the default product and pick the fix up with the next routine 6.18.y stable bump that includes it.

Record the caveat that a container run with privileged set in infix-containers (or with added CAP_BPF/CAP_SYS_ADMIN) and carrying its own BPF loader could reach the code. Such a container is already root-equivalent on the host.

Open questions

Which 6.18.y release contains the fix could not be determined from the tree.

I did not fully trace whether the list-head and rbtree-root destruction paths (bpf_list_head_free, bpf_rb_root_free) can be reached with harmful effect on a kernel without vmlinux BTF. Timer, workqueue and task_work fields remain usable, but the CVE text treats their cleanup as NMI-safe.

The search for BPF users covered board/, src/ and package/ plus the image config. I did not inspect whether iproute2 in this build can load BPF objects (BR2_PACKAGE_LIBBPF is unset, so probably not), and crun/podman may attach cgroup device programs that do not use maps with special fields.

Review Av26.10.0aarch64_minimalNot exposedAccepted by a member, 2026-11-20. The unfixed code is compiled into this kernel: array_map_update_elem() and the hashtab update/delete/recycle paths still call bpf_obj_free_fields(), and bpf_obj_cancel_fields() does not exist anywhere in the tree.Open the review →

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