CVE-2021-47190

perf bpf: Avoid memory leak from perf_env__insert_btf()

MEDIUM
5.5
CVSS Score
Published: April 10, 2024 at 06:56 PM UTC
Updated: June 17, 2026 at 04:16 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: perf bpf: Avoid memory leak from perf_env__insert_btf() perf_env__insert_btf() doesn't insert if a duplicate BTF id is encountered and this causes a memory leak. Modify the function to return a success/error value and then free the memory if insertion didn't happen. v2. Adds a return -1 when the insertion error occurs in perf_env__fetch_btf. This doesn't affect anything as the result is never checked.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.1 ≤ v < 5.10.825.1 ≤ v < 5.15.55.1 ≤ v < 5.165.1 ≤ v < 5.4.1625.11 ≤ v < 5.15.55.5 ≤ v < 5.10.823792cb2ff43b1b193136a03ce1336462a827d7925.1
Vendor states this is fixed in 11589d3144bc4e272e0aae46ce8156162e99babc (fixed)
Vendor states this is fixed in 4924b1f7c46711762fd0e65c135ccfbcfd6ded1f (fixed)
Vendor states this is fixed in 642fc22210a5e59d40b1e4d56d21ec3effd401f2 (fixed)
Vendor states this is fixed in ab7c3d8d81c511ddfb27823fb07081c96422b56e (fixed)
Vendor states this is fixed in 5.1 (unaffected)
Vendor states this is fixed in 5.10.82 (unaffected)
Vendor states this is fixed in 5.15.5 (unaffected)
Vendor states this is fixed in 5.16 (unaffected)
Vendor states this is fixed in 5.4.162 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/11589d3144bc4e272e0aae46ce8156162e99babc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4924b1f7c46711762fd0e65c135ccfbcfd6ded1f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/642fc22210a5e59d40b1e4d56d21ec3effd401f2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ab7c3d8d81c511ddfb27823fb07081c96422b56e

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card