Vulnerability in Kernel: Guard against accessing NULL pt_regs in bpf_get_task_stack()

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1000182: bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack(). Affects Kernel versions >= fa28dcb82a38f8e3993b0fae9106b1a80b59e4f0, < ff6bdc205fd0a83bd365405d4e31fb5905826996. 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 provides core functionalities and acts as a bridge between hardware and software. It manages system resources, facilitates communication between processes, and handles various low-level tasks. 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 of a given task and is used by various BPF programs for debugging and analysis purposes.

Vulnerability Detail

The vulnerability identified in the bpf_get_task_stack() function allows an attacker to access NULL pt_regs, which can lead to a kernel crash or potentially be exploited for arbitrary code execution. By manipulating certain parameters, an attacker can trigger this vulnerability and gain control over the affected system. This vulnerability was introduced in version v5.9 of the Linux Kernel and was fixed in version v5.10.96.

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, users can apply the patch provided in the fix commit (ff6bdc205fd0a83bd365405d4e31fb5905826996) manually to their Kernel version. The patch modifies the bpf_get_task_stack() function to include proper checks for NULL pt_regs before accessing them. Here is the code snippet for the patch:

<code snippet>

Conclusion

The vulnerability in the Kernel's bpf_get_task_stack() function, which allowed for accessing NULL pt_regs, has been addressed in version v5.10.96. Users are advised to update their Linux Kernel to this version or later to ensure their systems are protected. For further support or assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability can lead to a kernel crash or potentially allow an attacker to execute arbitrary code on the affected system.

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, only versions starting from v5.9 up to v5.10.95 are affected. The vulnerability was fixed in version v5.10.96.

At the time of this report, there are no known public exploits targeting this vulnerability. However, it is crucial to apply the necessary updates or patches to prevent any potential exploitation.

While updating the Kernel is the recommended solution, you can apply the provided patch manually to mitigate the risk temporarily. However, it is strongly advised to update to the latest version as soon as possible.

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