CVE Database›Document archive›CVE-2021-47214

CVE-2021-47214

kernel: hugetlb, userfaultfd: fix reservation restore on userfaultfd error

Loading…

Severity

Moderate

Red Hat Product Security

6.1

CVSS 3.1

Review impact separately from score.

Published · April 10, 2024

Updated · October 29, 2026

Description

A vulnerability was found in the Linux kernel, in the handling of memory reservations in the hugetlb subsystem and userfaultfd. This issue occurs during the error-handling process in the hugetlb_mcopy_atomic_pte() function. When an error is encountered, the system incorrectly calls restore_reserve_on_error(), which improperly removes memory reservations. This leads to a memory leak, as the following call to remove_inode_hugepages() erroneously increments the reserved hugepages counter. This vulnerability was fully resolved by modifying the process to correctly handle the reservation state and avoid unnecessary deletion in the event of an error.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 6.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L

CWE-402 · Transmission of Private Resources into a New Sphere ('Resource Leak')