mm, hugetlb: Fix simple resv_huge_pages underflow on UFFDIO_COPY in Kernel

Kernel Updated 02 Oct 2025

Summary

25/06/2021
N/A
No i
Unrated
Not published

GSD-2021-1000757: mm, hugetlb: fix simple resv_huge_pages underflow on UFFDIO_COPY. Affects Kernel versions >= 8fb5debc5fcd450470cdd789c2d80ef95ebb8cf4, < 14fd3da3e8d3de7f34d69dd4bfa5fd9e73d99911. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Kernel is a critical component of the Linux operating system that provides core functionalities and interfaces between hardware and software. It manages system resources, including memory, processes, and device drivers. The mm subsystem in the Kernel handles memory management, including the allocation and deallocation of memory pages. The hugetlb module within mm enables the use of huge pages, which are larger than the standard memory pages, for certain applications that require large memory mappings. This vulnerability affects the Kernel's handling of resv_huge_pages during UFFDIO_COPY operations.

Vulnerability Detail

The vulnerability arises from a simple resv_huge_pages underflow on UFFDIO_COPY in the mm, hugetlb module of the Kernel. This underflow can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition. The issue was introduced in version v4.11 of the Kernel and has been fixed in version v5.4.125. The vulnerability can be exploited by an attacker with local access to the system.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating the Kernel is not immediately feasible, a possible workaround is to disable the use of huge pages by modifying the system's configuration. This can be achieved by setting the 'vm.nr_hugepages' parameter to 0 in the '/etc/sysctl.conf' file and rebooting the system. However, this workaround may impact the performance of applications that rely on huge pages.

Conclusion

The mm, hugetlb vulnerability in the Kernel can lead to memory corruption and potential code execution or denial-of-service attacks. It is crucial to update the Kernel to version v5.4.125 or later to mitigate this vulnerability. If immediate updating is not possible, disabling the use of huge pages can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and the Vulert Playground will analyze it for any open-source vulnerabilities, including this one.

No, this vulnerability requires local access to the system in order to be exploited.

There are no known instances of this vulnerability being exploited in the wild at this time.

Disabling the use of huge pages can serve as a temporary mitigation until the Kernel is updated. However, this may impact the performance of certain applications.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback