Vulnerability in Kernel: mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls

Kernel Updated 02 Oct 2025

Summary

18/03/2022
N/A
No i
Unrated
Not published

GSD-2022-1000835: mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls. Affects Kernel versions >= 57a269a1b12a3a6fe51f62e1be5e74494bad1d92, < e93f2be33d4f4c1aa350dd79b6d1179746ff4cb5. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Kernel is a critical component of the Linux operating system that manages system resources and facilitates communication between hardware and software. It provides essential functionalities such as memory management, process scheduling, and device drivers. The mm subsystem within the Kernel is responsible for memory management. One of its functions, kvmalloc(), is used to allocate memory for the Kernel's virtual machine subsystem. However, there is a vulnerability in the way kvmalloc() handles oversized allocations, which can lead to potential security issues.

Vulnerability Detail

The vulnerability arises from the lack of consideration for the __GFP_NOWARN flag in oversized kvmalloc() calls. This flag suppresses allocation warnings, which can be useful in certain scenarios. However, when oversized allocations are made without this flag, it can result in memory corruption or other security vulnerabilities. An attacker could potentially exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. The vulnerability was introduced in version v5.10.71 of the Linux Kernel and has been fixed in version v5.10.104.

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 temporary workaround can be implemented by manually adding the __GFP_NOWARN flag to oversized kvmalloc() calls in the affected code. Here is an example of how the flag can be added:

kvmalloc(size, GFP_KERNEL | __GFP_NOWARN);

Conclusion

The vulnerability in the Kernel's mm subsystem, specifically in the handling of oversized kvmalloc() calls, can lead to memory corruption and other security vulnerabilities. It is crucial to update the Linux Kernel to version v5.10.104 or later to fix this issue. In the meantime, a temporary workaround can be implemented by manually adding the __GFP_NOWARN flag to affected code. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can potentially allow an attacker to execute arbitrary code, escalate privileges, or cause a denial-of-service condition.

You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

At the time of this report, there is no known public exploit for this vulnerability. However, it is still crucial to apply the necessary updates to mitigate the risk.

Yes, a temporary workaround is available by manually adding the __GFP_NOWARN flag to oversized kvmalloc() calls in the affected code. However, it is strongly recommended to update the Kernel as soon as possible.

There may be other vulnerabilities in the Kernel that are unrelated to this specific issue. It is important to regularly update the Kernel and stay informed about security advisories to mitigate any potential risks.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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