CVE-2023-53790

Source
https://cve.org/CVERecord?id=CVE-2023-53790
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53790.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-53790
Downstream
Published
2025-12-09T00:00:47.025Z
Modified
2026-03-10T21:50:33.326038Z
Summary
bpf: Zeroing allocated object from slab in bpf memory allocator
Details

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

bpf: Zeroing allocated object from slab in bpf memory allocator

Currently the freed element in bpf memory allocator may be immediately reused, for htab map the reuse will reinitialize special fields in map value (e.g., bpfspinlock), but lookup procedure may still access these special fields, and it may lead to hard-lockup as shown below:

NMI backtrace for cpu 16 CPU: 16 PID: 2574 Comm: htab.bin Tainted: G L 6.1.0+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), RIP: 0010:queuedspinlockslowpath+0x283/0x2c0 ...... Call Trace: <TASK> copymapvaluelocked+0xb7/0x170 bpfmapcopy_value+0x113/0x3c0 __sys_bpf+0x1c67/0x2780 __x64sysbpf+0x1c/0x20 dosyscall64+0x30/0x60 entrySYSCALL64afterhwframe+0x46/0xb0 ...... </TASK>

For htab map, just like the preallocated case, these is no need to initialize these special fields in map value again once these fields have been initialized. For preallocated htab map, these fields are initialized through __GFPZERO in bpfmapareaalloc(), so do the similar thing for non-preallocated htab in bpf memory allocator. And there is no need to use __GFP_ZERO for per-cpu bpf memory allocator, because __allocpercpugfp() does it implicitly.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53790.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
0fd7c5d43339b783ee3301a05f925d1e52ac87c9
Fixed
678ea18d6240299fd77d7000c8b1d7e5f274c8af
Fixed
5d447e04290e78bdc1a3a6c321320d384e09c2f1
Fixed
997849c4b969034e225153f41026657def66d286

Affected versions

v6.*
v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1
v6.1.10
v6.1.11
v6.1.12
v6.1.13
v6.1.14
v6.1.15
v6.1.2
v6.1.3
v6.1.4
v6.1.5
v6.1.6
v6.1.7
v6.1.8
v6.1.9
v6.2
v6.2-rc1
v6.2-rc2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
v6.2-rc7
v6.2-rc8
v6.2.1
v6.2.2

Database specific

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

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.16
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.2.3

Database specific

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