CVE-2021-47214

Medium

In the Linux kernel, the following vulnerability has been resolved: hugetlb, userfaultfd: fix reservation restore on userfaultfd error Currently in the is_continue case in hugetlb_mcopy_atomic_pte(), if we bail out using "goto out_release_unlock;" in the cases where idx >= size, or !huge_pte_none(), the code will detect that new_pagecache_page == false, and so call restore_reserve_on_error(). In this case I see restore_reserve_on_error() delete the reservation, and the following call to remove_inode_hugepages() will increment h->resv_hugepages causing a 100% reproducible leak. We should treat the is_continue case similar to adding a page into the pagecache and set new_pagecache_page to true, to indicate that there is no reservation to restore on the error path, and we need not call restore_reserve_on_error(). Rename new_pagecache_page to page_in_pagecache to make that clear.

Package Linux Kernel
Published 2024-04-10
Last modified 2025-03-27
CVSS version 3.1
Patch available
Yes

CVSS 3.1 score

5.5

out of 10
Medium
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness type

CWE-401

CVE-2021-47214 is a Memory Leak vulnerability

What is Memory Leak?

The product does not release memory after use, causing gradual resource exhaustion. Learn more on MITRE CWE

Affected versions

Linux kernel versions 5.13.13, 5.14 and later are affected. Fixed in 5.15.5, 5.16 and their respective stable series.

Affected from
≥ 5.13.13 ≥ 5.14
Fixed in
✓ 5.15.5 5.15.x ✓ 5.16

Frequently asked questions

  • What is CVE-2021-47214?

    CVE-2021-47214 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as a Memory Leak flaw (CWE-401) . It affects Linux kernel versions from 5.13.13 onward and has been patched in 5.15.5 and 5.16. CVE-2021-47214 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • What is the CVSS score for CVE-2021-47214?

    CVE-2021-47214 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H .

  • Is there a patch available for CVE-2021-47214?

    Yes. CVE-2021-47214 has been patched. Fixed versions include 5.15.5 and 5.16. If you are running Linux kernel 5.13.13 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2021-47214 actively exploited?

    No. CVE-2021-47214 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.