Bug 2025645 (CVE-2021-4001) - CVE-2021-4001 kernel: race condition when the EBPF map is frozen
Summary: CVE-2021-4001 kernel: race condition when the EBPF map is frozen
Keywords:
Status: NEW
Alias: CVE-2021-4001
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2029196 2029197 2025646 2027593 2029194 2029195 2029198
Blocks: 2024668 2025647
TreeView+ depends on / blocked
 
Reported: 2021-11-22 16:34 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-05-17 09:39 UTC (History)
44 users (show)

Fixed In Version: kernel 5.16 rc2
Doc Type: If docs needed, set a value
Doc Text:
A race condition was found in the Linux kernel's ebpf verifier between bpf_map_update_elem and bpf_map_freeze due to a missing lock in kernel/bpf/syscall.c. In this flaw, a local user with a special privilege (cap_sys_admin or cap_bpf) can modify the frozen mapped address space.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-11-22 16:34:57 UTC
A race problem is found in the ebpf verifier between bpf_map_update_elem and bpf_map_freeze due to a missing lock in kernel/bpf/syscall.c. In this flaw, a local user with a special privilege (cap_sys_admin or cap_bpf) can modify the frozen mapped address space.

Reference and upstream patch:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=353050be4c19e102178ccc05988101887c25ae53

Comment 1 Guilherme de Almeida Suckevicz 2021-11-22 16:35:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2025646]


Note You need to log in before you can comment on or make changes to this bug.