Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E7C732EAD16 for ; Tue, 30 Dec 2025 12:21:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097270; cv=none; b=YPeMRsy5wARSv9ei4NePiDJJPsNGvy31sL2+kcM2iym/oFS8zuO3KW+9DF11s1os8WBjogqeitbNJ6cbdTrd7lkqOEOA3O2h9MfeVNk1EfNjSj4hqEYAx1DeP3++PgjeADvdW1zIhFu/HthI/hYmospKNqb4qQpQdh+dgOPKXvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097270; c=relaxed/simple; bh=qTTSETLLwAqM1UTGXX01ZhSAfVC3dpuk3iQZ0ttQSJM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JA9XQx6EmmRxUJYa+Kl79hn8UttzSLTO87D/ZtTQ4R3et7MBMZNt5jOToWJJE6RDPrhfMlud9rCCKss+hztAhKHWLvhnv85crW0uZZacUfAE5nHCcRxOJRPx1booGRzVplwFAiYVFrHWg+2N9FxwK2D9vN6K4hR6sKrxDkHJxLI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sN3g21YY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sN3g21YY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71164C4CEFB; Tue, 30 Dec 2025 12:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767097269; bh=qTTSETLLwAqM1UTGXX01ZhSAfVC3dpuk3iQZ0ttQSJM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=sN3g21YYbwhZmdJjG2mDk31jmoLqTIbEFM6HTpCePiteRdwi3IQdg9L8v9KAFkaNr LuquiMqp1Lvm7Y8w6iJlKGmMnGzjUrPr9o5JFAKyjJo7by+h9gsUb/LeQuEP0KT9Lr /jQ3Huj538emvYroJF9CuQECbq9hkzhQm/urjm5k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54247: bpf: Silence a warning in btf_type_id_size() Date: Tue, 30 Dec 2025 13:20:13 +0100 Message-ID: <2025123053-CVE-2023-54247-4cf1@gregkh> X-Mailer: git-send-email 2.52.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=3380; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+gRLlQHA9kG9I+hGzNI5uH+ecKtE27b4c6F3NYOWFGk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBhzPLrzCuOzs9KZYrN0vpXMmLgKLqDTvtovYfmGDFH rBRfNGkjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIzhGGeVrznKue/F3ru1f9 g2tUmHXvwvv6exnmypiGTV65e3nOO8Hfay3iDj9S/VPeAwA= 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: Silence a warning in btf_type_id_size() syzbot reported a warning in [1] with the following stacktrace: WARNING: CPU: 0 PID: 5005 at kernel/bpf/btf.c:1988 btf_type_id_size+0x2d9/0x9d0 kernel/bpf/btf.c:1988 ... RIP: 0010:btf_type_id_size+0x2d9/0x9d0 kernel/bpf/btf.c:1988 ... Call Trace: map_check_btf kernel/bpf/syscall.c:1024 [inline] map_create+0x1157/0x1860 kernel/bpf/syscall.c:1198 __sys_bpf+0x127f/0x5420 kernel/bpf/syscall.c:5040 __do_sys_bpf kernel/bpf/syscall.c:5162 [inline] __se_sys_bpf kernel/bpf/syscall.c:5160 [inline] __x64_sys_bpf+0x79/0xc0 kernel/bpf/syscall.c:5160 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd With the following btf [1] DECL_TAG 'a' type_id=4 component_idx=-1 [2] PTR '(anon)' type_id=0 [3] TYPE_TAG 'a' type_id=2 [4] VAR 'a' type_id=3, linkage=static and when the bpf_attr.btf_key_type_id = 1 (DECL_TAG), the following WARN_ON_ONCE in btf_type_id_size() is triggered: if (WARN_ON_ONCE(!btf_type_is_modifier(size_type) && !btf_type_is_var(size_type))) return NULL; Note that 'return NULL' is the correct behavior as we don't want a DECL_TAG type to be used as a btf_{key,value}_type_id even for the case like 'DECL_TAG -> STRUCT'. So there is no correctness issue here, we just want to silence warning. To silence the warning, I added DECL_TAG as one of kinds in btf_type_nosize() which will cause btf_type_id_size() returning NULL earlier without the warning. [1] https://lore.kernel.org/bpf/000000000000e0df8d05fc75ba86@google.com/ The Linux kernel CVE team has assigned CVE-2023-54247 to this issue. Affected and fixed versions =========================== Fixed in 6.1.110 with commit 61f4bd46a03a81865aca3bcbad2f7b7032fb3160 Fixed in 6.4.7 with commit 7c4f5ab63e7962812505cbd38cc765168a223acb Fixed in 6.5 with commit e6c2f594ed961273479505b42040782820190305 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-2023-54247 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/61f4bd46a03a81865aca3bcbad2f7b7032fb3160 https://git.kernel.org/stable/c/7c4f5ab63e7962812505cbd38cc765168a223acb https://git.kernel.org/stable/c/e6c2f594ed961273479505b42040782820190305