CVE-2021-47298

bpf, sockmap: Fix potential memory leak on unlikely error case

MEDIUM
5.5
CVSS Score
Published: May 21, 2024 at 02:35 PM UTC
Updated: June 17, 2026 at 04:17 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: bpf, sockmap: Fix potential memory leak on unlikely error case If skb_linearize is needed and fails we could leak a msg on the error handling. To fix ensure we kfree the msg block before returning error. Found during code review.

Affected

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

5.10 ≤ v < 5.10.545.10 ≤ v < 5.13.65.10 ≤ v < 5.145.11 ≤ v < 5.13.64363023d2668e621b0743db351a9555d6e6ea57e5.14 rc15.14 rc2
Vendor states this is fixed in 6c508a1c6c62793dc6e6872cad4b200097bab7c9 (fixed)
Vendor states this is fixed in 715f378f42909c401ec043f5150c4fdf57fb8889 (fixed)
Vendor states this is fixed in 7e6b27a69167f97c56b5437871d29e9722c3e470 (fixed)
Vendor states this is fixed in 5.10 (unaffected)
Vendor states this is fixed in 5.10.54 (unaffected)
Vendor states this is fixed in 5.13.6 (unaffected)
Vendor states this is fixed in 5.14 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6c508a1c6c62793dc6e6872cad4b200097bab7c9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/715f378f42909c401ec043f5150c4fdf57fb8889
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7e6b27a69167f97c56b5437871d29e9722c3e470

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