Skip to contentSkip to conversation

CVE-2023-54145: bpf: drop unnecessary user-triggerable WARN_ONCE in verifierl log

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

bpf: drop unnecessary user-triggerable WARN_ONCE in verifierl log

It's trivial for user to trigger "verifier log line truncated" warning, as verifier has a fixed-sized buffer of 1024 bytes (as of now), and there are at least two pieces of user-provided information that can be output through this buffer, and both can be arbitrarily sized by user:
- BTF names;
- BTF.ext source code lines strings.

Verifier log buffer should be properly sized for typical verifier state output. But it's sort-of expected that this buffer won't be long enough in some circumstances. So let's drop the check. In any case code will work correctly, at worst truncating a part of a single line output.

The Linux kernel CVE team has assigned CVE-2023-54145 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.1.107 with commit 40c88c429a598006f91ad7a2b89856cd50b3a008
	Fixed in 6.4.7 with commit 926a175026fed5d534f587ea4ec3ec49265cd3c5
	Fixed in 6.5 with commit cff36398bd4c7d322d424433db437f3c3391c491

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-54145

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/log.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/40c88c429a598006f91ad7a2b89856cd50b3a008
	https://git.kernel.org/stable/c/926a175026fed5d534f587ea4ec3ec49265cd3c5
	https://git.kernel.org/stable/c/cff36398bd4c7d322d424433db437f3c3391c491