CVE-2022-50490
kernel: bpf: Propagate error from htab_lock_bucket() to userspace
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · October 4, 2025
Updated · August 5, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Propagate error from htab_lock_bucket() to userspace
In __htab_map_lookup_and_delete_batch() if htab_lock_bucket() returns -EBUSY, it will go to next bucket. Going to next bucket may not only skip the elements in current bucket silently, but also incur out-of-bound memory access or expose kernel memory to userspace if current bucket_cnt is greater than bucket_size or zero.
Fixing it by stopping batch operation and returning -EBUSY when htab_lock_bucket() fails, and the application can retry or skip the busy batch as needed.
Statement
This patch fixes a potential information disclosure and out-of-bounds access in the BPF hashtable batch operation. The previous logic skipped busy buckets silently, which could expose uninitialized kernel memory to userspace. Exploitation requires BPF privileges (CAP_BPF or CAP_SYS_ADMIN). For the Red Hat Enterprise Linux the BPF not accessible by default (and only root user can enable it).
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 6.3CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H
CWE not specified