Menu

Star on GitHub · 3.4k

CVE-2021-47607

5.5 · MEDIUM

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 follow…

Published Jun 19, 2024EPSS 0.25%

Overview

CVE-2021-47607 is a medium-severity vulnerability. It was published on June 19, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

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_RE

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-47607?

CVE-2021-47607 is a medium-severity vulnerability. It was published on June 19, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

How severe is CVE-2021-47607?

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-47607?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-47607?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-47607 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related MEDIUM CVEs from 2021

View all
Watch the demo →