NULL Pointer Check Missing in lkdtm/bugs Package

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1002661: lkdtm/bugs: Check for the NULL pointer after calling kmalloc. Affects Kernel versions >= ae2e1aad3e48e495878d9f149e437a308bfdaefa, < ce12f7f6b19596edd6b250716930a4ce38bd1f96. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The lkdtm/bugs package is a component of the Linux Kernel ecosystem. It provides a set of kernel self-tests for various bug scenarios. These tests are designed to validate the behavior of the kernel in the presence of specific bugs. The package is widely used by developers and testers to identify and fix issues in the Linux Kernel.

Vulnerability Detail

The vulnerability identified in the lkdtm/bugs package is the absence of a NULL pointer check after calling kmalloc. This vulnerability was introduced in version v5.7 of the Linux Kernel by commit ae2e1aad3e48e495878d9f149e437a308bfdaefa and was fixed in version v5.18.4 by commit ce12f7f6b19596edd6b250716930a4ce38bd1f96. The lack of a NULL pointer check can lead to a potential NULL pointer dereference, causing a system crash or allowing an attacker to execute arbitrary code. The impact and attack plausibility of this vulnerability have not been proven yet.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.18.4 or later. This can be done by pulling the latest code from the official Linux Kernel repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and compiling and installing the updated kernel. Alternatively, users can wait for their Linux distribution to release an updated package containing the fix.

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

Workaround

As a temporary workaround, developers can manually add a NULL pointer check after calling kmalloc in the affected code. Here is an example of how the check can be implemented:

void *ptr = kmalloc(size, GFP_KERNEL);
if (!ptr) {
  // Handle allocation failure
}

Conclusion

In conclusion, the lkdtm/bugs package in the Linux Kernel is vulnerable to a NULL pointer dereference due to the absence of a NULL pointer check after calling kmalloc. This vulnerability can lead to system crashes or potential execution of arbitrary code. It is recommended to update the Linux Kernel to version v5.18.4 or later to fix this vulnerability. Alternatively, developers can apply a temporary workaround by manually adding a NULL pointer check in the affected code. For further support and assistance 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 due to a NULL pointer dereference to potential execution of arbitrary code by an attacker.

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 playground will analyze it for any open-source vulnerabilities, including this one.

At the time of this report, there is no known exploit for this vulnerability. However, it is important to apply the fix as soon as possible to mitigate any potential risks.

While updating the kernel is the recommended solution, you can apply a temporary workaround by manually adding a NULL pointer check after calling kmalloc in the affected code. Please refer to the 'workaround' section for more details.

You can find more information about this vulnerability, including the commit details and source code changes, in the vulnerability database maintained by the Cloud Security Alliance. Here is the link to the specific vulnerability: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1002xxx/GSD-2022-1002661.json

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.18.4 or later. This can be done by pulling the latest code from the official Linux Kernel repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and compiling and installing the updated kernel. Alternatively, users can wait for their Linux distribution to release an updated package containing the fix.

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.