CVE-2021-47516
MediumIn the Linux kernel, the following vulnerability has been resolved: nfp: Fix memory leak in nfp_cpp_area_cache_add() In line 800 (#1), nfp_cpp_area_alloc() allocates and initializes a CPP area structure. But in line 807 (#2), when the cache is allocated failed, this CPP area structure is not freed, which will result in memory leak. We can fix it by freeing the CPP area when the cache is allocated failed (#2). 792 int nfp_cpp_area_cache_add(struct nfp_cpp *cpp, size_t size) 793 { 794 struct nfp_cpp_area_cache *cache; 795 struct nfp_cpp_area *area; 800 area = nfp_cpp_area_alloc(cpp, NFP_CPP_ID(7, NFP_CPP_ACTION_RW, 0), 801 0, size); // #1: allocates and initializes 802 if (!area) 803 return -ENOMEM; 805 cache = kzalloc(sizeof(*cache), GFP_KERNEL); 806 if (!cache) 807 return -ENOMEM; // #2: missing free 817 return 0; 818 }
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-401CVE-2021-47516 is a Memory Leak vulnerability
What is Memory Leak?
The product does not release memory after use, causing gradual resource exhaustion. Learn more on MITRE CWE
References
The following references provide additional information about CVE-2021-47516 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/2e0e072e62fdaf7816220af08e05c020f0fcb77a
-
PatchKernel patch commithttps://git.kernel.org/stable/c/3e93abcdcec0436fbf0b6a88ae806902426895a2
-
PatchKernel patch commithttps://git.kernel.org/stable/c/484069b5de9d223cc1c64c6f80389a99cfef51f1
Frequently asked questions
-
What is CVE-2021-47516?
CVE-2021-47516 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as a Memory Leak flaw (CWE-401) . CVE-2021-47516 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2021-47516?
CVE-2021-47516 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2021-47516?
No patch is currently available for CVE-2021-47516. Monitor the NIST NVD and your Linux distribution's security advisories for updates.
-
Is CVE-2021-47516 actively exploited?
No — CVE-2021-47516 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Memory Leak (CWE-401)?
The product does not release memory after use, causing gradual resource exhaustion. View CWE-401 on MITRE CWE →