* CVE-2026-98064: bpf: Fix NULL-ptr-deref when showing a void BTF type
@ 2026-09-25 10:26 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-09-25 10:26 UTC (permalink / raw)
To: linux-cve-announce; +Cc: Greg Kroah-Hartman
From: Greg Kroah-Hartman <gregkh@kernel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix NULL-ptr-deref when showing a void BTF type
btf_modifier_show() resolves the modifier and then calls
btf_type_ops(t)->show() unconditionally. For the void type (type_id 0,
BTF_KIND_UNKN) kind_ops[] has no entry, so ->show is NULL.
A "const void" (a modifier resolving to void) cannot be a map key or
value - map_check_btf() rejects it because void has no size - so the map
dump path does not reach it. But bpf_snprintf_btf() takes a type_id
straight from the BPF program, and passing such a "const void" from the
vmlinux BTF NULL-derefs:
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
RIP: 0010:btf_modifier_show (kernel/bpf/btf.c:2914)
Call Trace:
<TASK>
btf_type_show (kernel/bpf/btf.c:8251)
btf_type_snprintf_show (kernel/bpf/btf.c:8321)
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:94)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
</TASK>
Fall back to btf_df_show() when the resolved type has no show op; it
emits the "<unsupported kind:N>" placeholder already used for kinds like
FWD and FUNC. bpf_snprintf_btf() then returns the length as usual.
The Linux kernel CVE team has assigned CVE-2026-98064 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10 with commit c4d0bfb45068d853a478b9067a95969b1886a30f and fixed in 6.12.111 with commit 717abdfd1d559d01fdd102023f0a990fb0437240
Issue introduced in 5.10 with commit c4d0bfb45068d853a478b9067a95969b1886a30f and fixed in 6.18.53 with commit 98f1cb95221332139acf514350ae2cae3b8656c5
Issue introduced in 5.10 with commit c4d0bfb45068d853a478b9067a95969b1886a30f and fixed in 7.2.7 with commit 5324f4e75ff6e9c2ca2e267c5f34f0937f9d0ac9
Issue introduced in 5.10 with commit c4d0bfb45068d853a478b9067a95969b1886a30f and fixed in 7.3-rc2 with commit 4ea508b9ebd78bce7f212166d2e2cba66b875f08
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98064
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/bpf/btf.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/717abdfd1d559d01fdd102023f0a990fb0437240
https://git.kernel.org/stable/c/98f1cb95221332139acf514350ae2cae3b8656c5
https://git.kernel.org/stable/c/5324f4e75ff6e9c2ca2e267c5f34f0937f9d0ac9
https://git.kernel.org/stable/c/4ea508b9ebd78bce7f212166d2e2cba66b875f08
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-25 10:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 10:26 CVE-2026-98064: bpf: Fix NULL-ptr-deref when showing a void BTF type Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.