CVE-2021-3489Improper Restriction of Operations within the Bounds of a Memory Buffer in Kernel

Severity
7.8HIGHNVD
OSV4.4
EPSS
0.1%
top 77.12%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedJun 4
Latest updateMay 24

Description

The eBPF RINGBUF bpf_ringbuf_reserve() function in the Linux kernel did not check that the allocated size was smaller than the ringbuf size, allowing an attacker to perform out-of-bounds writes within the kernel and therefore, arbitrary code execution. This issue was fixed via commit 4b81ccebaeee ("bpf, ringbuf: Deny reserve of buffers larger than ringbuf") (v5.13-rc4) and backported to the stable kernels in v5.12.4, v5.11.21, and v5.10.37. It was introduced via 457f44363a88 ("bpf: Implement BPF

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitability: 1.8 | Impact: 5.9

Affected Packages3 packages

CVEListV5linux/linux_kerneltrunkv5.13-rc4+4
NVDlinux/linux_kernel5.85.10.37+3
Debianlinux/linux_kernel< 5.10.38-1+3

Also affects: Ubuntu Linux 20.04, 20.10, 21.04

Patches

🔴Vulnerability Details

6
GHSA
GHSA-45wv-rq2g-2vvj: The eBPF RINGBUF bpf_ringbuf_reserve() function in the Linux kernel did not check that the allocated size was smaller than the ringbuf size, allowing2022-05-24
OSV
CVE-2021-3489: In __bpf_ringbuf_reserve of ringbuf2021-10-01
OSV
CVE-2021-3489: The eBPF RINGBUF bpf_ringbuf_reserve() function in the Linux kernel did not check that the allocated size was smaller than the ringbuf size, allowing2021-06-04
CVEList
Linux kernel eBPF RINGBUF map oversized allocation2021-06-04
OSV
linux, linux-aws, linux-azure, linux-gcp, linux-hwe-5.8, linux-kvm, linux-oracle, linux-raspi vulnerabilities2021-05-11

📋Vendor Advisories

5
Ubuntu
Linux kernel (OEM) vulnerabilities2021-05-11
Ubuntu
Linux kernel vulnerabilities2021-05-11
Ubuntu
Linux kernel vulnerabilities2021-05-11
Red Hat
kernel: Linux kernel eBPF RINGBUF map oversized allocation2021-05-11
Debian
CVE-2021-3489: linux - The eBPF RINGBUF bpf_ringbuf_reserve() function in the Linux kernel did not chec...2021
CVE-2021-3489 — Linux Kernel vulnerability | cvebase