CVE-2023-52621
kernel: bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers
These three bpf_map_{lookup,update,delete}_elem() helpers are also
available for sleepable bpf program, so add the corresponding lock
assertion for sleepable bpf program, otherwise the following warning
will be reported when a sleepable bpf program manipulates bpf map under
interpreter mode (aka bpf_jit_enable=0):
WARNING: CPU: 3 PID: 4985 at kernel/bpf/helpers.c:40 ......
CPU: 3 PID: 4985 Comm: test_progs Not tainted 6.6.0+ #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ......
RIP: 0010:bpf_map_lookup_elem+0x54/0x60
......
Call Trace:
<TASK>
? __warn+0xa5/0x240
? bpf_map_lookup_elem+0x54/0x60
? report_bug+0x1ba/0x1f0
? handle_bug+0x40/0x80
? exc_invalid_op+0x18/0x50
? asm_exc_invalid_op+0x1b/0x20
? __pfx_bpf_map_lookup_elem+0x10/0x10
? rcu_lockdep_current_cpu_online+0x65/0xb0
? rcu_is_watching+0x23/0x50
? bpf_map_lookup_elem+0x54/0x60
? __pfx_bpf_map_lookup_elem+0x10/0x10
___bpf_prog_run+0x513/0x3b70
__bpf_prog_run32+0x9d/0xd0
? __bpf_prog_enter_sleepable_recur+0xad/0x120
? __bpf_prog_enter_sleepable_recur+0x3e/0x120
bpf_trampoline_6442580665+0x4d/0x1000
__x64_sys_getpgid+0x5/0x30
? do_syscall_64+0x36/0xb0
entry_SYSCALL_64_after_hwframe+0x6e/0x76
</TASK>
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-617
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 87 fixes
Oracle Linux 2 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | bpftool +13 | 5.15.0-310.184.5.2.el8uek |
| 9 | kernel +28 | 5.14.0-503.11.1.el9_5 |
| 9 | kernel-uek +17 | 5.15.0-310.184.5.2.el9uek |
| 9 | bpftool | 7.4.0-503.11.1.el9_5 |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.235-5.ph4 |
| 5.0 | bpftool +10 | 6.1.77-1.ph5 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | bpftool +25 | eol | — |
| 8 | bpftool +45 | affected | — |
| 9 | kernel-rt +20 | affected | — |
| 9 | kernel +61 | 0:5.14.0-503.11.1.el9_5 | RHSA-2024:9315 |
| 9 | bpftool | 0:7.4.0-503.11.1.el9_5 | RHSA-2024:9315 |
SUSE Linux Enterprise 2 releases · 7 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | kernel-livepatch-5-14-21-150400-24-116-default | 1-150400.9.5.1 | SUSE-SU-2024:1321-1 |
| 15.4 | cluster-md-kmp-default +17 | 5.14.21-150400.24.116.1 | SUSE-SU-2024:1321-1 |
| 15.4 | kernel-default-base | 5.14.21-150400.24.116.1.150400.24.54.5 | SUSE-SU-2024:1321-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-13-47-rt | 1-150500.11.3.1 | SUSE-SU-2024:1466-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-13-43-rt | 1-150500.11.5.1 | SUSE-SU-2024:1322-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-55-59-default | 1-150500.11.7.1 | SUSE-SU-2024:1480-1 |
3 more rows
SUSE Linux Enterprise Micro 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.3 | kernel-rt +1 | 5.14.21-150400.15.76.1 | SUSE-SU-2024:1320-1 |
| 5.3 | kernel-default | 5.14.21-150400.24.116.1 | SUSE-SU-2024:1321-1 |
| 5.3 | kernel-default-base | 5.14.21-150400.24.116.1.150400.24.54.5 | SUSE-SU-2024:1321-1 |
| 5.4 | kernel-rt +1 | 5.14.21-150400.15.76.1 | SUSE-SU-2024:1320-1 |
| 5.4 | kernel-default | 5.14.21-150400.24.116.1 | SUSE-SU-2024:1321-1 |
| 5.4 | kernel-default-base | 5.14.21-150400.24.116.1.150400.24.54.5 | SUSE-SU-2024:1321-1 |
3 more rows
amazon linux 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-77-99-164 | 1.0-0.amzn2023 |
| 2023 | bpftool +19 | 6.1.77-99.164.amzn2023 |
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.237-1 |
| 12 | linux | 6.1.82-1 |
| 13 | linux | 6.7.7-1 |
| 14 | linux | 6.7.7-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.1.82-1 |
openSUSE Leap Micro 2 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.3 | kernel-rt | 5.14.21-150400.15.76.1 | SUSE-SU-2024:1320-1 |
| 5.3 | kernel-default | 5.14.21-150400.24.116.1 | SUSE-SU-2024:1321-1 |
| 5.3 | kernel-default-base | 5.14.21-150400.24.116.1.150400.24.54.5 | SUSE-SU-2024:1321-1 |
| 5.4 | kernel-rt | 5.14.21-150400.15.76.1 | SUSE-SU-2024:1320-1 |
| 5.4 | kernel-default | 5.14.21-150400.24.116.1 | SUSE-SU-2024:1321-1 |
| 5.4 | kernel-default-base | 5.14.21-150400.24.116.1.150400.24.54.5 | SUSE-SU-2024:1321-1 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.237-1 |
| 12 | rootio-linux | 6.1.82-1 |
| 13 | rootio-linux | 6.7.7-1 |
root.io ubuntu 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | rootio-linux | 5.15.0-127.137 |
ubuntu 4 releases · 33 packages
| Release | Package | Fixed in |
|---|---|---|
| 20.04 | linux-nvidia-tegra-5-15 | 5.15.0-1032.32~20.04.1 |
| 20.04 | linux-ibm-5-15 | 5.15.0-1066.69~20.04.1 |
| 20.04 | linux-riscv-5-15 | 5.15.0-1069.73~20.04.1 |
| 20.04 | linux-intel-iotg-5-15 +1 | 5.15.0-1071.77~20.04.1 |
| 20.04 | linux-gcp-5-15 | 5.15.0-1072.80~20.04.1 |
| 20.04 | linux-aws-5-15 | 5.15.0-1073.79~20.04.1 |
35 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-52621
- git.kernel.org https://git.kernel.org/linus/169410eba271afc9f0fb476d996795aa26770c6d (6.8-rc1)
- git.kernel.org https://git.kernel.org/stable/c/169410eba271afc9f0fb476d996795aa26770c6d
- git.kernel.org https://git.kernel.org/stable/c/3516f93cc63d956e1b290ae4b7bf2586074535a0
- git.kernel.org https://git.kernel.org/stable/c/483cb92334cd7f1d5387dccc0ab5d595d27a669d
- git.kernel.org https://git.kernel.org/stable/c/82f2df94dac1aa9b879e74d1f82ba1b631bdc612
- git.kernel.org https://git.kernel.org/stable/c/c7f1b6146f4a46d727c0d046284c28b6882c6304
- git.kernel.org https://git.kernel.org/stable/c/d6d6fe4bb105595118f12abeed4a7bdd450853f3
- linux.oracle.com https://linux.oracle.com/cve/CVE-2023-52621.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2025-20470.html
Show all 29 references
- lists.debian.org https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/20240326171931.1354035-4-lee@kernel.org/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-52621
- ubuntu.com https://ubuntu.com/security/notices/USN-6818-1
- ubuntu.com https://ubuntu.com/security/notices/USN-6818-2
- ubuntu.com https://ubuntu.com/security/notices/USN-6818-3
- ubuntu.com https://ubuntu.com/security/notices/USN-6818-4
- ubuntu.com https://ubuntu.com/security/notices/USN-6819-1
- ubuntu.com https://ubuntu.com/security/notices/USN-6819-2
- ubuntu.com https://ubuntu.com/security/notices/USN-6819-3
- ubuntu.com https://ubuntu.com/security/notices/USN-6819-4
- ubuntu.com https://ubuntu.com/security/notices/USN-7166-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7166-2
- ubuntu.com https://ubuntu.com/security/notices/USN-7166-3
- ubuntu.com https://ubuntu.com/security/notices/USN-7166-4
- ubuntu.com https://ubuntu.com/security/notices/USN-7186-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7186-2
- ubuntu.com https://ubuntu.com/security/notices/USN-7194-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-52621
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.