module

Linux eBPF ALU32 32-bit Invalid Bounds Tracking LPE

Disclosed
2021-05-11
Created
2021-09-01

Description

Linux kernels from 5.7-rc1 prior to 5.13-rc4, 5.12.4, 5.11.21, and
5.10.37 are vulnerable to a bug in the eBPF verifier's verification
of ALU32 operations in the scalar32_min_max_and function when performing
AND operations, whereby under certain conditions the bounds of a
32 bit register would not be properly updated.

This can be abused by attackers to conduct an out of bounds read
and write in the Linux kernel and therefore achieve arbitrary
code execution as the root user.

The target system must be compiled with eBPF support and not have
kernel.unprivileged_bpf_disabled set, which prevents unprivileged
users from loading eBPF programs into the kernel. Note that if
kernel.unprivileged_bpf_disabled is enabled this module can still be
utilized to bypass protections such as SELinux, however the user
must already be logged as a privileged user such as root.

Authors

Manfred Paul
chompie1337
Grant Willcox

Platform

Linux

Architectures

x86, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands ‘show options’ or ‘show advanced’:


msf > use exploit/linux/local/cve_2021_3490_ebpf_alu32_bounds_check_lpe
msf exploit(cve_2021_3490_ebpf_alu32_bounds_check_lpe) > show targets
...targets...
msf exploit(cve_2021_3490_ebpf_alu32_bounds_check_lpe) > set TARGET < target-id >
msf exploit(cve_2021_3490_ebpf_alu32_bounds_check_lpe) > show options
...show and set options...
msf exploit(cve_2021_3490_ebpf_alu32_bounds_check_lpe) > exploit

Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.