Menu

Star on GitHub · 3.4k

CVE-2021-46988

5.5 · MEDIUM

In the Linux kernel, the following vulnerability has been resolved: userfaultfd: release page in error path to avoid BUG_ON Consider the following sequence of events: 1.

Published Feb 28, 2024CWE-416EPSS 0.24%

Overview

CVE-2021-46988 is a medium-severity vulnerability. It was published on February 28, 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:

userfaultfd: release page in error path to avoid BUG_ON

Consider the following sequence of events:

1. Userspace issues a UFFD ioctl, which ends up calling into

shmem_mfill_atomic_pte(). We successfully account the blocks, we

shmem_alloc_page(), but then the copy_from_user() fails. We return

-ENOENT. We don't release the page we allocated.

2. Our caller detects this error code, tries the copy_from_user() after

dropping the mmap_lock, and retries, calling back into

shmem_mfill_atomic_pte().

3. Meanwhile, let's say another process filled up the tmpfs being used.

4. So shmem_mfill_atomic_pte() fails to account blocks this time, and

immediately returns - without releasing the page.

This triggers a BUG_ON in our caller, which asserts that the page

should always be consumed, unless -ENOENT is returned.

To fix this, detect if we have such a "dangling" page when accounting

fails, and if so, release it bef

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

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

How severe is CVE-2021-46988?

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

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

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