Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix NULL-ptr-deref in btf_var_show()

btf_var_show() calls btf_type_id_resolve() unconditionally, which
dereferences btf->resolved_ids. That is NULL for a base BTF - e.g. the
vmlinux BTF that bpf_snprintf_btf() renders against - since base BTF is
not resolved during parsing. btf_modifier_show() guards this with
'if (btf->resolved_ids)', but btf_var_show() does not.

A BPF program that passes the type_id of a BTF_KIND_VAR from the vmlinux
BTF to bpf_snprintf_btf() thus NULL-derefs:

KASAN: probably user-memory-access in range [0x46638-0x4663f]
RIP: 0010:btf_var_show (kernel/bpf/btf.c:2929)
Call Trace:
<TASK>
btf_type_show (kernel/bpf/btf.c:8259)
btf_type_snprintf_show (kernel/bpf/btf.c:8329)
bpf_snprintf_btf (kernel/trace/bpf_trace.c:1047)
bpf_prog_test_run_raw_tp (net/bpf/test_run.c:829)
__sys_bpf (kernel/bpf/syscall.c:4804)
do_syscall_64 (arch/x86/entry/syscall_64.c:84)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
</TASK>

Resolve the var's type directly with btf_type_skip_modifiers() when
resolved_ids is NULL, mirroring btf_modifier_show().
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Denial of Service via kernel crash
Action: Immediate Patch
AI Analysis

Impact

A NULL pointer dereference occurs in the BPF field‑type display routine when the BTF (BPF Type Format) structure supplies an unresolved type table. When a BPF program supplies a type identifier from the system’s base BTF to the printing routine, the kernel dereferences a null pointer and triggers a crash. The crash manifests as a kernel memory fault, leading to a system stop or reboot. This can be leveraged by an attacker who can run custom BPF programs to force the kernel into a fatal state, resulting in a denial of service.

Affected Systems

The vulnerability is present in the Linux kernel prior to the patch that implements the guard for missing resolved identifiers. Any distribution or deployment that runs a kernel version containing the unguarded btf_var_show implementation and exposes user BPF APIs can be impacted. Exact version numbers are not provided in the data, so users should check whether their kernel includes the upstream commit that fixes the issue.

Risk and Exploitability

The CVSS score is not listed and the EPSS score is unavailable, so the inherent risk is inferred from the nature of the fault. A kernel crash is a severe impact that allows an attacker to disrupt availability. Exploitation requires the ability to load or execute user BPF code, which is typically allowed on systems with open BPF access. The vulnerability is not listed in the CISA KEV catalog, but because it is a kernel null‑pointer dereference, it is plausible that adversaries could target it. The lack of a public exploit does not diminish the need for remediation because a successful crash is a straightforward gain for persistent attackers or as part of a larger attack chain.

Generated by OpenCVE AI on September 25, 2026 at 16:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest kernel version that includes the bpf null‑pointer dereference fix, which is shipped in the upstream patch set for newer releases.
  • If your distribution has not yet released a patched kernel, consider backporting the commit chain that guards btf->resolved_ids or using a newer upstream kernel from a trusted source.
  • As a temporary mitigation, disable or restrict user BPF program loading by disabling CONFIG_BPF in the kernel configuration or by applying system‑level controls that prevent unauthenticated users from creating BPF programs.

Generated by OpenCVE AI on September 25, 2026 at 16:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 16:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-476

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Fix NULL-ptr-deref in btf_var_show() btf_var_show() calls btf_type_id_resolve() unconditionally, which dereferences btf->resolved_ids. That is NULL for a base BTF - e.g. the vmlinux BTF that bpf_snprintf_btf() renders against - since base BTF is not resolved during parsing. btf_modifier_show() guards this with 'if (btf->resolved_ids)', but btf_var_show() does not. A BPF program that passes the type_id of a BTF_KIND_VAR from the vmlinux BTF to bpf_snprintf_btf() thus NULL-derefs: KASAN: probably user-memory-access in range [0x46638-0x4663f] RIP: 0010:btf_var_show (kernel/bpf/btf.c:2929) Call Trace: <TASK> btf_type_show (kernel/bpf/btf.c:8259) btf_type_snprintf_show (kernel/bpf/btf.c:8329) bpf_snprintf_btf (kernel/trace/bpf_trace.c:1047) bpf_prog_test_run_raw_tp (net/bpf/test_run.c:829) __sys_bpf (kernel/bpf/syscall.c:4804) do_syscall_64 (arch/x86/entry/syscall_64.c:84) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) </TASK> Resolve the var's type directly with btf_type_skip_modifiers() when resolved_ids is NULL, mirroring btf_modifier_show().
Title bpf: Fix NULL-ptr-deref in btf_var_show()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T10:24:07.203Z

Reserved: 2026-09-25T10:19:56.073Z

Link: CVE-2026-98063

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:35.327

Modified: 2026-09-25T11:17:35.327

Link: CVE-2026-98063

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T16:30:15Z

Weaknesses