Null Pointer Dereference in bpf_get_task_stack() in Kernel

Kernel Updated 02 Oct 2025

Summary

27/02/2022
N/A
No i
Unrated
Not published

GSD-2022-1000603: bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack(). Affects Kernel versions >= fa28dcb82a38f8e3993b0fae9106b1a80b59e4f0, < b82ef4985a6d05e80f604624332430351df7b79a. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 functionality for the proper functioning of the system. The bpf_get_task_stack() function is part of the Berkeley Packet Filter (BPF) subsystem in the Kernel. It is responsible for retrieving the stack pointer of a given task. This vulnerability in bpf_get_task_stack() allows an attacker to access NULL pt_regs, potentially leading to a null pointer dereference. This vulnerability was introduced in Linux Kernel version v5.9 and has been fixed in version v5.16.5.

Vulnerability Detail

The vulnerability arises from a lack of proper validation in the bpf_get_task_stack() function. When attempting to retrieve the stack pointer of a task, the function does not guard against accessing NULL pt_regs. This can be exploited by an attacker to trigger a null pointer dereference, potentially leading to a system crash or other unintended consequences. 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.16.5 or later. This update includes the necessary patch to address the null pointer dereference issue in bpf_get_task_stack(). Updating the Kernel ensures that the system is protected against potential exploitation of 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, if updating the Kernel is not immediately feasible, it is advisable to disable or restrict access to the BPF subsystem. This can be achieved by modifying the system configuration or applying appropriate access controls. However, it is important to note that this workaround may impact the functionality of applications or services that rely on the BPF subsystem.

Conclusion

The null pointer dereference vulnerability in bpf_get_task_stack() in the Kernel can be mitigated by updating to version v5.16.5 or later. It is crucial to promptly apply the recommended fix to ensure the security and stability of the system. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The impact of this vulnerability can vary depending on the specific system configuration and the attacker's capabilities. It could potentially lead to a system crash or allow an attacker to execute arbitrary code with kernel-level privileges.

You can use tools like Vulert (https://vulert.com) to check if your system is affected by this vulnerability. Vulert analyzes the package-lock.json file and provides real-time monitoring and alerts for open-source vulnerabilities.

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

The recommended mitigation is to update the Linux Kernel to version v5.16.5 or later. This update includes the necessary patch to address the vulnerability. If immediate update is not possible, restricting access to the BPF subsystem can serve as a temporary workaround.

The discovery of this vulnerability is credited to the Linux Kernel development community. The vulnerability was identified and fixed through the collaborative efforts of the community.

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.16.5 or later. This update includes the necessary patch to address the null pointer dereference issue in bpf_get_task_stack(). Updating the Kernel ensures that the system is protected against potential exploitation of 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

Follow Vulert in Google

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