Menu

Star on GitHub · 3.2k

CVE-2021-47299

5.5 · MEDIUM

In the Linux kernel, the following vulnerability has been resolved: xdp, net: Fix use-after-free in bpf_xdp_link_release The problem occurs between dev_get_by_index() and dev_xdp_attach_link().

Published May 21, 2024CWE-416EPSS 0.23%

Overview

CVE-2021-47299 is a medium-severity vulnerability. It was published on May 21, 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:

xdp, net: Fix use-after-free in bpf_xdp_link_release

The problem occurs between dev_get_by_index() and dev_xdp_attach_link().

At this point, dev_xdp_uninstall() is called. Then xdp link will not be

detached automatically when dev is released. But link->dev already

points to dev, when xdp link is released, dev will still be accessed,

but dev has been released.

dev_get_by_index() |

link->dev = dev |

| rtnl_lock()

| unregister_netdevice_many()

| dev_xdp_uninstall()

| rtnl_unlock()

rtnl_lock(); |

dev_xdp_attach_link() |

rtnl_unlock(); |

| netdev_run_todo() // dev released

bpf_xdp_link_release() |

/* access dev. |

use-after-free */ |

[ 45.966867] BUG: KASAN: use-after-free in bpf_xdp_link_release

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-47299?

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

How severe is CVE-2021-47299?

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-47299?

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-47299?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-47299 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