CVE-2021-47298
JSON

5.5medium

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

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.23% (higher than 15% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom 4363023d2668e621b0743db351a9555d6e6ea57e before 715f378f42909c401ec043f5150c4fdf57fb8889, from 4363023d2668e621b0743db351a9555d6e6ea57e before 6c508a1c6c62793dc6e6872cad4b200097bab7c9, from 4363023d2668e621b0743db351a9555d6e6ea57e before 7e6b27a69167f97c56b5437871d29e9722c3e470, 5.10
Not affected: before 5.10, from 5.10.54 up to 5.10.*, from 5.13.6 up to 5.13.*, from 5.14 up to *
CVE List
linux linux_kernelfrom 5.10 before 5.10.54, from 5.11 before 5.13.6, 5.14NVD

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: bpf, sockmap: corrige una posible pérdida de memoria en un caso de error poco probable. Si se necesita skb_linearize y falla, podríamos filtrar un mensaje sobre el manejo de errores. Para solucionarlo, asegúrese de liberar el bloque de mensajes antes de devolver el error. Encontrado durante la revisión del código.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47298 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47298 changed 2026-06-17Public domain