What’s Vulnerable › Vulnerabilities
CVE-2021-47298: bpf, sockmap: Fix potential memory leak on unlikely error case
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-21 · updated 2026-06-17
- Weakness: CWE-401
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 products
- Linux kernel: from 5.10 before 5.10.54; from 5.11 before 5.13.6; 5.14-rc1, 5.14-rc2 — fixed in 5.10.54, 5.13.6
How to fix
Upgrade to a fixed version: Linux kernel 5.10.54, 5.13.6. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/6c508a1c6c62793dc6e6872cad4b200097bab7c9
- https://git.kernel.org/stable/c/715f378f42909c401ec043f5150c4fdf57fb8889
- https://git.kernel.org/stable/c/7e6b27a69167f97c56b5437871d29e9722c3e470
- https://git.kernel.org/stable/c/6c508a1c6c62793dc6e6872cad4b200097bab7c9
- https://git.kernel.org/stable/c/715f378f42909c401ec043f5150c4fdf57fb8889
- https://git.kernel.org/stable/c/7e6b27a69167f97c56b5437871d29e9722c3e470
Get alerted when CVE-2021-47298 or the next vulnerability affects your stack