Advisory
UBUNTU-CVE-2021-47607
Also known as: CVE-2021-47607
Summary
The record has no summary.
Details
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix kernel address leakage in atomic cmpxchg's r0 aux reg The implementation of BPF_CMPXCHG on a high level has the following parameters: .-[old-val] .-[new-val] BPF_R0 = cmpxchg{32,64}(DST_REG + insn->off, BPF_R0, SRC_REG) -[mem-loc] -[old-val] Given a BPF insn can only have two registers (dst, src), the R0 is fixed and used as an auxilliary register for input (old value) as well as output (returning old value from memory location). While the verifier performs a number of safety checks, it misses to reject unprivileged programs where R0 contains a pointer as old value. Through brute-forcing it takes about ~16sec on my machine to leak a kernel pointer with BPF_CMPXCHG. The PoC is basically probing for kernel addresses by storing the guessed address into the map slot as a scalar, and using the map value pointer as R0 while SRC_REG has a canary value to detect a matching address. Fix it by checking R0 for pointers, and reject if that's the case for unprivileged programs.
Severity
Medium Basis: CVSS v3 score 5.5, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Dates
- Published
- 2024-06-19 15:15 UTC
- Modified
- 2025-10-24 04:52 UTC
Affected packages and fixes
| Package | System | Fix |
|---|---|---|
| linux-hwe-edge | Debian packages (deb) · Ubuntu 16.04 | No fixed version is listed. |
| linux-aws-5.0 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-aws-5.3 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-azure | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-azure-5.3 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-azure-edge | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-gcp | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-gcp-5.3 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-gke-4.15 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-gke-5.4 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-gkeop-5.4 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-hwe | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-hwe-edge | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-oem | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-oracle-5.0 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-oracle-5.3 | Debian packages (deb) · Ubuntu 18.04 | No fixed version is listed. |
| linux-aws-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-aws-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-aws-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-azure-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-azure-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-azure-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-azure-fde | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-gcp-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-gcp-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-gcp-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-gke | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-gke-5.15 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-hwe-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-hwe-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-hwe-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-intel-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oem-5.10 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oem-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oem-5.14 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oem-5.6 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oracle-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oracle-5.13 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-oracle-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-raspi2 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-riscv | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-riscv-5.11 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-riscv-5.8 | Debian packages (deb) · Ubuntu 20.04 | No fixed version is listed. |
| linux-allwinner-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-aws-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-aws-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-azure-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-azure-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-azure-fde-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-azure-fde-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-gcp-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-gcp-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-hwe-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-hwe-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-lowlatency-hwe-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-lowlatency-hwe-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-nvidia-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-oem-5.17 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-oem-6.0 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-oem-6.1 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-riscv | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-riscv-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-starfive-5.19 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
| linux-starfive-6.2 | Debian packages (deb) · Ubuntu 22.04 | No fixed version is listed. |
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Links
- https://ubuntu.com/security/CVE-2021-47607
- https://www.cve.org/CVERecord?id=CVE-2021-47607
- https://git.kernel.org/linus/a82fe085f344ef20b452cd5f481010ff96b5c4cd
- https://git.kernel.org/stable/c/f87a6c160ecc8c7b417d25f508d3f076fe346136
- https://git.kernel.org/stable/c/a82fe085f344ef20b452cd5f481010ff96b5c4cd
Source
Source: Ubuntu Security Notices · CC BY-SA 4.0