From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A325B495AD6 for ; Fri, 25 Sep 2026 10:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332516; cv=none; b=FafioGtg77UACuBZKyIC+gyTcQ8U/Sjhzx2pblkzv/rrPtz57iJcBKFgYmQO58UE1lCqiZyljwduvrNAq/OMv7XCnnTdJ7aHK2I9kulXQ1xaDUvwPUstSN3cm+Dr57SE5bRmRL1Bq/DTRoEgMjnRXlqKYhTrM/taEEbUy4J3Qm4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332516; c=relaxed/simple; bh=t/L1cIzSdlhboQcERGlUOZwr9Cquj62yvwHG8DIFqdU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eVXeXsuXiy1jH62rB/N3AQ2NtRKNQFIoexgMPvMKo73VSkplm70ckcCBSFriI5bxCb5DWnUb8YR1ynDy52lBIJfyXkmvLOKUdu/6g+94Sak/tHfzJGcCEwUby1it2w79uz/ENW09gBToOsIa2tlNFv+/JBpeS8F1TKfHeKBoTws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uMeW8vQT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uMeW8vQT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 073731F000FF; Fri, 25 Sep 2026 10:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332515; bh=N35CBjO0UgcPhjKS/fmWG+cCXzJbYV3LD/04hkjiVPU=; h=From:To:Cc:Subject:Date:Reply-To; b=uMeW8vQTtFKZ4u1A0x/jXja+wzC1+iosv1gavy5kwlVFMepcvgTH4MV9AoLUQ+/xA LsJg2pnewTjxThGbYUz6RpR38lgPFQEZCNT9pcTccMuL/BbZARasjD/sKT8WYLzDyo xisyR3hIX2+MfjrBkUGRjKirC8K0UxzhEFxyxJEU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98064: bpf: Fix NULL-ptr-deref when showing a void BTF type Date: Fri, 25 Sep 2026 12:26:06 +0200 Message-ID: <2026092535-CVE-2026-98064-45cd@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3434; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1WSdMP24z0P+VzLf5U0h5LwA5gkoIPg8ucjDgVj9C/c=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvLMnxnJ4vDnZvlLS78R381n3s7n3S/7Vnz4vWP3Fs +cn+d4xdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEij4wLNh4LS4j7Evoh4/T 9fmat3xWC1TuP8YwV8LZocni/qe1/+SfT9hn0zmrXfLHMgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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: 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) Fall back to btf_df_show() when the resolved type has no show op; it emits the "" 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