bpf: drop unnecessary user-triggerable WARN_ONCE in verifierl log
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.1.1076.4.76.5In 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.
From the CVE record · Linux
The Linux kernel’s BPF verifier log can emit a warning when user-provided BTF names or source lines exceed its fixed-size line buffer. A user who can trigger verifier logging can cause the warning; the log line may be truncated, but the code otherwise works correctly.
Engineers running the Linux kernel should check whether their kernel includes the BPF verifier log fix; affected versions are not specified.