SecurityContext

CVE-2021-46988: Linux Kernel - Denial of Service

  • Cve: CVE-2021-46988
  • Name: Linux Kernel - Denial of Service
  • 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 before returning.
  • Impact: This issue can cause kernel panics or crashes due to dangling pages and improper resource cleanup, potentially leading to denial of service.
  • Remediation: Apply the patch that detects and releases dangling pages in shmem_mfill_atomic_pte() upon accounting failure, or update to the latest kernel version where this fix is included.
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.0024
  • Epss percentile: 0.15025
  • Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  • Published at: 2024-02-28T09:15:37Z
  • Age in days: 1000
  • Modified at: 2026-06-17T04:16:05Z
  • Patch available: yes
  • References total: 7
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-46988
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: vulnerability type, requirements, hackerone

Cwe

IdName
CWE-416Use After Free

References

Same in every row:

  • Source: nvd
  • Tags: Patch
Url
https://git.kernel.org/stable/c/07c9b834c97d0fa3402fb7f3f3b32df370a6ff1f
https://git.kernel.org/stable/c/140cfd9980124aecb6c03ef2e69c72d0548744de
https://git.kernel.org/stable/c/2d59a0ed8b26b8f3638d8afc31f839e27759f1f6
https://git.kernel.org/stable/c/319116227e52d49eee671f0aa278bac89b3c1b69
https://git.kernel.org/stable/c/7ed9d238c7dbb1fdb63ad96a6184985151b0171c
https://git.kernel.org/stable/c/ad53127973034c63b5348715a1043d0e80ceb330
https://git.kernel.org/stable/c/b3f1731c6d7fbc1ebe3ed8eff6d6bec56d76ff43

Products

ProductAffectedPlatform boundSourcesUrl
linux:linux_kernel= 5.13 rc1; >= 5.12, < 5.12.5; >= 5.11, < 5.11.22; >= 5.5, < 5.10.38; >= 4.20, < 5.4.120; >= 4.15, < 4.19.191; >= 4.11, < 4.14.233nonvd/v1/products/linux/linux_kernel

Projects

RepositoryLink kindsIndexedUrl
torvalds/linuxcna_commit, commityes/v1/repositories/torvalds/linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 10038339
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports