CVE-2023-52621

Source
https://cve.org/CVERecord?id=CVE-2023-52621
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52621.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-52621
Downstream
Related
Published
2024-03-26T17:19:23.208Z
Modified
2026-03-13T07:48:06.669288Z
Summary
bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers
Details

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

bpf: Check rcureadlocktraceheld() before calling bpf map helpers

These three bpfmap{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 bpfjit_enable=0):

WARNING: CPU: 3 PID: 4985 at kernel/bpf/helpers.c:40 ...... CPU: 3 PID: 4985 Comm: testprogs Not tainted 6.6.0+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... RIP: 0010:bpfmaplookupelem+0x54/0x60 ...... Call Trace: <TASK> ? __warn+0xa5/0x240 ? bpfmaplookupelem+0x54/0x60 ? reportbug+0x1ba/0x1f0 ? handlebug+0x40/0x80 ? excinvalidop+0x18/0x50 ? asmexcinvalidop+0x1b/0x20 ? __pfxbpfmaplookupelem+0x10/0x10 ? rculockdepcurrentcpuonline+0x65/0xb0 ? rcuiswatching+0x23/0x50 ? bpfmaplookup_elem+0x54/0x60 ? __pfxbpfmaplookupelem+0x10/0x10 ___bpfprogrun+0x513/0x3b70 __bpfprogrun32+0x9d/0xd0 ? __bpfprogentersleepablerecur+0xad/0x120 ? __bpfprogentersleepablerecur+0x3e/0x120 bpftrampoline6442580665+0x4d/0x1000 __x64sysgetpgid+0x5/0x30 ? dosyscall64+0x36/0xb0 entrySYSCALL64afterhwframe+0x6e/0x76 </TASK>

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52621.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1e6c62a8821557720a9b2ea9617359b264f2f67c
Fixed
82f2df94dac1aa9b879e74d1f82ba1b631bdc612
Fixed
3516f93cc63d956e1b290ae4b7bf2586074535a0
Fixed
d6d6fe4bb105595118f12abeed4a7bdd450853f3
Fixed
483cb92334cd7f1d5387dccc0ab5d595d27a669d
Fixed
c7f1b6146f4a46d727c0d046284c28b6882c6304
Fixed
169410eba271afc9f0fb476d996795aa26770c6d

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52621.json"