CVE-2023-52828 json
bpf: Detect IP == ksym.end as part of BPF program
published 2024-05-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2023-59543
- cvss
- 6.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 15%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
bpf: Detect IP == ksym.end as part of BPF program
Now that bpf_throw kfunc is the first such call instruction that has noreturn semantics within the verifier, this also kicks in dead code elimination in unprecedented ways. For one, any instruction following a bpf_throw call will never be marked as seen. Moreover, if a callchain ends up throwing, any instructions after the call instruction to the eventually throwing subprog in callers will also never be marked as seen.
The tempting way to fix this would be to emit extra 'int3' instructions which bump the jited_len of a program, and ensure that during runtime when a program throws, we can discover its boundaries even if the call instruction to bpf_throw (or to subprogs that always throw) is emitted as the final instruction in the program.
An example of such a program would be this:
do_something(): ... r0 = 0 exit
foo(): r1 = 0 call bpf_throw r0 = 0 exit
bar(cond): if r1 != 0 goto pc+2 call do_something exit call foo r0 = 0 // Never seen by verifier exit //
main(ctx): r1 = ... call bar r0 = 0 exit
Here, if we do end up throwing, the stacktrace would be the following:
bpf_throw foo bar main
In bar, the final instruction emitted will be the call to foo, as such, the return address will be the subsequent instruction (which the JIT emits as int3 on x86). This will end up lying outside the jited_len of the program, thus, when unwinding, we will fail to discover the return address as belonging to any program and end up in a panic due to the unreliable stack unwinding of BPF programs that we never expect.
To remedy this case, make bpf_prog_ksym_find treat IP == ksym.end as part of the BPF program, so that is_bpf_text_address returns true when such a case occurs, and we are able to unwind reliably when the final instruction ends up being a call instruction.
Patch / fix
- Linux Linux 5.10.202, 5.15.140, 6.1.64, 6.5.13, 6.6.3, 6.7
- linux Debian 12 6.1.64-1
- linux Debian 14, Debian 13 6.6.8-1
debian advisories DEBIAN-CVE-2023-52828
- linux Ubuntu 22.04 LTS 5.15.0-100.110
- linux-aws Ubuntu 22.04 LTS 5.15.0-1056.61
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1053.61
- linux-gke Ubuntu 22.04 LTS 5.15.0-1052.57
- linux-ibm Ubuntu 22.04 LTS 5.15.0-1048.51
- linux-kvm Ubuntu 22.04 LTS 5.15.0-1052.57
- linux-azure Ubuntu 22.04 LTS 5.15.0-1058.66
- linux-gkeop Ubuntu 22.04 LTS 5.15.0-1038.44
ubuntu advisories UBUNTU-CVE-2023-52828
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/6058e4829696412457729a00734969acc6fd1d18 commit
- git.kernel.org/stable/c/cf353904a82873e952633fcac4385c2fcd3a46e1 commit
- git.kernel.org/stable/c/aa42a7cb92647786719fe9608685da345883878f commit
- git.kernel.org/stable/c/327b92e8cb527ae097961ffd1610c720481947f5 commit
- git.kernel.org/stable/c/821a7e4143af115b840ec199eb179537e18af922 commit
- git.kernel.org/stable/c/66d9111f3517f85ef2af0337ece02683ce0faf21 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-52828 updated cvss 5.5
kernel: bpf: Detect IP == ksym.end as part of BPF program
-
Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-selftests-internalaffected: no fix available
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +82 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/6058e4829696412457729a00734969acc6fd1d18
patch
-
git.kernel.org
/stable/c/cf353904a82873e952633fcac4385c2fcd3a46e1
patch
-
git.kernel.org
/stable/c/aa42a7cb92647786719fe9608685da345883878f
patch
-
git.kernel.org
/stable/c/327b92e8cb527ae097961ffd1610c720481947f5
patch
-
git.kernel.org
/stable/c/821a7e4143af115b840ec199eb179537e18af922
patch
-
git.kernel.org
/stable/c/66d9111f3517f85ef2af0337ece02683ce0faf21
patch
Sources
- CVE List CVE-2023-52828
- NVD CVE-2023-52828
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.