Bugzilla – Bug 1224974
VUL-0: CVE-2021-47298: kernel: bpf, sockmap: Fix potential memory leak on unlikely error case
Last modified: 2024-06-12 11:57:34 UTC
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. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-47298 https://www.cve.org/CVERecord?id=CVE-2021-47298 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/pub/scm/linux/security/vulns.git/plain/cve/published/2021/CVE-2021-47298.mbox
7e6b27a69167 ("bpf, sockmap: Fix potential memory leak on unlikely error case") merged v5.14-rc3~30^2~38^2~3 Fixes: 4363023d2668 ("bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list") merged v5.10-rc5~24^2^2~3 No backport needed, all branches either does not have buggy commit or already has the fix. Reassigning back to security team.
All done, closing.