CVE Vulnerabilities

CVE-2021-4001

Time-of-check Time-of-use (TOCTOU) Race Condition

Published: Jan 21, 2022 | Modified: Nov 16, 2022
CVSS 3.x
4.1
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
CVSS 2.x
4.7 MEDIUM
AV:L/AC:M/Au:N/C:N/I:C/A:N
RedHat/V2
RedHat/V3
Ubuntu

A race condition was found in the Linux kernels 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. This flaw affects kernel versions prior to 5.16 rc2.

Weakness

The product checks the state of a resource before using that resource, but the resource’s state can change between the check and the use in a way that invalidates the results of the check. This can cause the product to perform invalid actions when the resource is in an unexpected state.

Affected Software

Name Vendor Start Version End Version
Linux_kernel Linux * 5.15 (including)
Linux_kernel Linux 5.16-rc1 (including) 5.16-rc1 (including)

Potential Mitigations

References