Cloudanix VulnDB

CVE-2021-4001

Medium · 4.1

CVSS

4.1

EPSS

0.2%

Published

Jan 21, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A local administrator on certain Linux-based systems could change protected memory areas that should have been locked, risking system integrity.

Exploitation
Local Privilege
Attacker needs
High Privilege
Complexity
High
Impact
Data Tampering
Component
OS kernel
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

Race condition in the eBPF verifier between bpf_map_update_elem and bpf_map_freeze due to missing lock allows a privileged local user to modify a frozen map's address space.

Why it matters to the business

A local administrator or container runtime with BPF capabilities could alter protected kernel memory mappings, potentially leading to integrity violations or privilege escalation on affected systems; the issue is old with no active exploitation campaigns reported and limited downstream impact.

How an attack unfolds

An attacker with CAP_SYS_ADMIN or CAP_BPF first creates an eBPF map, races bpf_map_update_elem against bpf_map_freeze to bypass the freeze protection, and then modifies the now-frozen address space to corrupt kernel structures.

How to fix it

Upgrade affected Xen packages on Alpine v3.13 to version 4.14.5-r1 or later; for general Linux kernels apply patches that add the missing lock in kernel/bpf/syscall.c (versions 5.16-rc2 and newer).

How to confirm the fix worked

Confirm the running kernel or Xen package reports version 5.16-rc2+ or 4.14.5-r1+ respectively; inspect kernel source for the lock acquisition around bpf_map_update_elem and bpf_map_freeze; run eBPF map freeze/update stress tests to verify the race is closed.

Typical attack path

  1. Obtain local access with CAP_SYS_ADMIN or CAP_BPF
  2. Create eBPF map via bpf syscall
  3. Trigger concurrent bpf_map_update_elem and bpf_map_freeze calls to win the race
  4. Write to the now-mutable frozen map address space
  5. Leverage the corruption for further kernel access or denial of service

How to detect it

Review kernel audit logs and eBPF-related syscalls for unusual map update patterns around freeze operations; no public exploit artifacts are known so focus on capability usage and map mutation events post-freeze.

What your security team should do

  • Apply the listed package upgrades immediately on all Alpine Xen hosts
  • Audit systems for any processes or containers holding CAP_SYS_ADMIN or CAP_BPF
  • Restrict BPF usage via LSM or seccomp policies where possible
  • Monitor for future kernel updates and schedule regular patching

The record

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. This flaw affects kernel versions prior to 5.16 rc2.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 5.10.84-1
Debian:12 linux 0 5.15.5-1
Debian:13 linux 0 5.15.5-1
Mageia:8 kernel 0 5.15.6-2.mga8
Mageia:8 kernel-linus 0 5.15.6-1.mga8
Mageia:8 kmod-virtualbox 0 6.1.30-1.2.mga8
Mageia:8 kmod-xtables-addons 0 3.18-1.34.mga8
SUSE:Enterprise Storage 7 kernel-default 0 5.3.18-24.99.1
SUSE:Enterprise Storage 7 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Enterprise Storage 7 kernel-docs 0 5.3.18-24.99.1
SUSE:Enterprise Storage 7 kernel-obs-build 0 5.3.18-24.99.1
SUSE:Enterprise Storage 7 kernel-preempt 0 5.3.18-24.99.1
SUSE:Enterprise Storage 7 kernel-source 0 5.3.18-24.99.1
SUSE:Enterprise Storage 7 kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Availability Extension 15 SP2 kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Availability Extension 15 SP3 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-docs 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-obs-build 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-preempt 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-source 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-docs 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-obs-build 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-preempt 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-source 0 5.3.18-24.99.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise Live Patching 15 SP2 kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise Live Patching 15 SP2 kernel-livepatch-SLE15-SP2_Update_23 0 1-5.3.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_0 0 13-150200.3.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_1 0 11-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_10 0 5-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_11 0 1-7.3.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_2 0 11-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_3 0 11-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_4 0 10-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_5 0 9-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_6 0 7-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_7 0 7-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_9 0 6-150300.2.1
SUSE:Linux Enterprise Micro 5.0 kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise Micro 5.0 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise Micro 5.0 kernel-rt 0 5.3.18-65.2
SUSE:Linux Enterprise Micro 5.1 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise Micro 5.1 kernel-default-base 0 5.3.18-59.40.1.18.25.1
SUSE:Linux Enterprise Micro 5.1 kernel-rt 0 5.3.18-68.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-64kb 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-default-base 0 5.3.18-59.40.1.18.25.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-preempt 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-source 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 kernel-zfcpdump 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3 kernel-docs 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3 kernel-obs-build 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3 kernel-preempt 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3 kernel-source 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3 kernel-syms 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Legacy 15 SP3 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP3 kernel-azure 0 5.3.18-38.34.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP3 kernel-source-azure 0 5.3.18-38.34.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP3 kernel-syms-azure 0 5.3.18-38.34.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-docs 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-preempt 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-source 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-BCL kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-docs 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-obs-build 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-preempt 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-source 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-default 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-docs 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-obs-build 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-preempt 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-source 0 5.3.18-24.99.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-syms 0 5.3.18-24.99.1
SUSE:Linux Enterprise Workstation Extension 15 SP3 kernel-default 0 5.3.18-59.40.1
SUSE:Linux Enterprise Workstation Extension 15 SP3 kernel-preempt 0 5.3.18-59.40.1
SUSE:Manager Proxy 4.1 kernel-default 0 5.3.18-24.99.1
SUSE:Manager Proxy 4.1 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Manager Proxy 4.1 kernel-docs 0 5.3.18-24.99.1
SUSE:Manager Proxy 4.1 kernel-preempt 0 5.3.18-24.99.1
SUSE:Manager Proxy 4.1 kernel-source 0 5.3.18-24.99.1
SUSE:Manager Proxy 4.1 kernel-syms 0 5.3.18-24.99.1
SUSE:Manager Retail Branch Server 4.1 kernel-default 0 5.3.18-24.99.1
SUSE:Manager Retail Branch Server 4.1 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Manager Retail Branch Server 4.1 kernel-docs 0 5.3.18-24.99.1
SUSE:Manager Retail Branch Server 4.1 kernel-preempt 0 5.3.18-24.99.1
SUSE:Manager Retail Branch Server 4.1 kernel-source 0 5.3.18-24.99.1
SUSE:Manager Retail Branch Server 4.1 kernel-syms 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-default 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-default-base 0 5.3.18-24.99.1.9.46.1
SUSE:Manager Server 4.1 kernel-docs 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-obs-build 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-preempt 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-source 0 5.3.18-24.99.1
SUSE:Manager Server 4.1 kernel-syms 0 5.3.18-24.99.1
SUSE:Package Hub 15 SP3 connman 0 1.41-bp153.2.3.1
SUSE:Real Time Module 15 SP2 kernel-rt 0 5.3.18-65.2
SUSE:Real Time Module 15 SP2 kernel-rt_debug 0 5.3.18-65.2
SUSE:Real Time Module 15 SP2 kernel-source-rt 0 5.3.18-65.2
SUSE:Real Time Module 15 SP2 kernel-syms-rt 0 5.3.18-65.1
SUSE:Real Time Module 15 SP3 kernel-rt 0 5.3.18-68.1
SUSE:Real Time Module 15 SP3 kernel-rt_debug 0 5.3.18-68.1
SUSE:Real Time Module 15 SP3 kernel-source-rt 0 5.3.18-68.1
SUSE:Real Time Module 15 SP3 kernel-syms-rt 0 5.3.18-68.1
Ubuntu:14.04:LTS linux 0 3.11.0-12.19
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1002.2
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-13.29~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-2.16
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1001.10
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1009.9
Ubuntu:16.04:LTS linux-gcp 0 4.10.0-1004.4
Ubuntu:16.04:LTS linux-hwe 0 4.8.0-39.42~16.04.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1004.9
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:18.04:LTS linux 0 4.13.0-16.19
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-dell300x 0 4.15.0-1005.8
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-edge 0 5.0.0-15.16~18.04.1
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oem-osp1 0 5.0.0-1010.11
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:18.04:LTS linux-raspi2 0 4.13.0-1005.5
Ubuntu:18.04:LTS linux-snapdragon 0 4.4.0-1077.82
Ubuntu:20.04:LTS linux 0 5.4.0-164.181
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1111.120
Ubuntu:20.04:LTS linux-aws-5.11 0 5.11.0-1028.31~20.04.1
Ubuntu:20.04:LTS linux-aws-5.13 0 5.13.0-1012.13~20.04.1
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1014.18~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1117.124
Ubuntu:20.04:LTS linux-azure-5.11 0 5.11.0-1028.31~20.04.2
Ubuntu:20.04:LTS linux-azure-5.13 0 5.13.0-1013.15~20.04.1
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1007.8~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1019.24~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1072.78
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1115.124
Ubuntu:20.04:LTS linux-gcp-5.11 0 5.11.0-1029.33~20.04.3
Ubuntu:20.04:LTS linux-gcp-5.13 0 5.13.0-1013.16~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1006.9~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1078.82
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1003.5~20.04.2
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 5.13.0-28.31~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1058.63
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1003.5~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1023.24
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1100.106
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 5.10.0-1053.55
Ubuntu:20.04:LTS linux-oem-5.13 0 5.13.0-1029.36
Ubuntu:20.04:LTS linux-oem-5.14 0 5.14.0-1022.24
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1110.119
Ubuntu:20.04:LTS linux-oracle-5.11 0 5.11.0-1028.31~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.13 0 5.13.0-1016.20~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1007.9~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1095.106
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1015.17~20.04.1

Related vulnerabilities