Menu

Star on GitHub · 3.2k

CVE-2021-47516

5.5 · MEDIUM

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 st…

Published May 24, 2024CWE-401EPSS 0.24%

Overview

CVE-2021-47516 is a medium-severity vulnerability. It was published on May 24, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical 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 }

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-47516?

CVE-2021-47516 is a medium-severity vulnerability. It was published on May 24, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

How severe is CVE-2021-47516?

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-47516?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-47516?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-47516 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related MEDIUM CVEs from 2021

View all