NULL Pointer Check Vulnerability in Kernel

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1002993: lkdtm/bugs: Check for the NULL pointer after calling kmalloc. Affects Kernel versions >= ae2e1aad3e48e495878d9f149e437a308bfdaefa, < ec89c6200f8d94a86d57b2bb881fb079417f4901. 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 process management, memory management, and device drivers. The vulnerability in focus is related to the 'lkdtm/bugs' module, which is a set of kernel self-tests designed to expose various bugs and vulnerabilities. This specific vulnerability arises due to a missing NULL pointer check after calling the 'kmalloc' function.

Vulnerability Detail

The vulnerability occurs when the 'kmalloc' function is called without checking if the returned pointer is NULL. This can lead to a NULL pointer dereference, causing the system to crash or potentially allowing an attacker to execute arbitrary code. The vulnerability was introduced in version v5.7 of the Linux Kernel and was fixed in version v5.17.15. It is important to note that the impact and attack plausibility of this vulnerability have not been proven.

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

As a workaround, developers can manually add a NULL pointer check after calling the 'kmalloc' function to ensure the returned pointer is not NULL. Here is an example of how this can be done in C code:

void *ptr = kmalloc(size, GFP_KERNEL);
if (ptr == NULL) {
    // Handle error or return
}

Conclusion

The NULL pointer check vulnerability in the Kernel, specifically in the 'lkdtm/bugs' module, can lead to system crashes or potential code execution. It is crucial to update the Linux Kernel to version v5.17.15 or later to address this vulnerability. Developers can also implement a workaround by manually adding a NULL pointer check. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The impact of this vulnerability can range from a system crash to potential code execution by an attacker.

You can check the version of the Linux Kernel installed on your system and compare it to the fixed version (v5.17.15 or later). Additionally, you can use vulnerability monitoring tools like Vulert (https://vulert.com) to scan your system for known vulnerabilities.

At the time of this report, no known exploits for this vulnerability have been documented.

The remote exploitability of this vulnerability has not been determined. However, it is always recommended to keep systems up to date to mitigate potential risks.

As mentioned earlier, a workaround is available by manually adding a NULL pointer check after calling the 'kmalloc' function. However, it is strongly advised to update the Kernel to the fixed version to ensure comprehensive vulnerability mitigation.

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