CVE-2021-47516: nfp: Fix memory leak in nfp_cpp_area_cache_add()
Vulnerability summary
CVE-2021-47516 is a medium (CVSS 5.5) vulnerability in linux. EPSS estimates a 0.24% chance of exploitation in the next 30 days, higher than 15.1% of scored vulnerabilities.
Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 11 · Related 11Timeline
- 24-05-2024PublishedVulnerability first disclosed.
- 11-05-2026Last modifiedVulnerability information updated.
Description
In 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 metrics
3 scores · 3 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.24%
Chance of exploitation in the next 30 days
Percentile
15%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.24% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu87 products
- linux< 4.15.0-169.177 | < 5.4.0-100.113
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws< 4.15.0-1121.129 | < 5.4.0-1066.69
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Linux2 products
- linux≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < 3e93abcdcec0436fbf0b6a88ae806902426895a2 | ≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < eb51f639ef3fd5498b7def290ed8681b6aadd9a7 | ≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < 2e0e072e62fdaf7816220af08e05c020f0fcb77a | ≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < 484069b5de9d223cc1c64c6f80389a99cfef51f1 | ≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < f707820c09239d6f67699d9b2ff57863cc7905b0 | ≥ 4cb584e0ee7df70fd0376aee60cf701855ea8c81, < c56c96303e9289cc34716b1179597b6f470833de | 4.11
- linux_kernel≥ 4.11, < 4.14.258 | ≥ 4.15, < 4.19.221 | ≥ 4.20, < 5.4.165 | ≥ 5.5, < 5.10.85 | ≥ 5.11, < 5.15.8
Debian1 product
- linux< 5.15.15-1
3 vendors · 90 products