UAF Vulnerability in bpf Package

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1001245: bpf: Fix UAF due to race between btf_try_get_module and load_module. Affects Kernel versions >= 541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c, < 0481baa2318cb1ab13277715da6cdbb657807b3f. 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 bpf package is a component of the Linux Kernel, which is responsible for implementing Berkeley Packet Filters (BPF) in the kernel. BPF is a technology that allows user-defined programs to run in the kernel context, enabling efficient packet filtering and network analysis. The bpf package is critical for network-related operations and is widely used in Linux-based systems.

Vulnerability Detail

The identified vulnerability in the bpf package is a Use-After-Free (UAF) issue that arises due to a race condition between the btf_try_get_module and load_module functions. This vulnerability can be exploited by an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition. The UAF occurs when the btf_try_get_module function tries to access a module that has been freed by the load_module function, leading to memory corruption and potential code execution.

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 temporary workaround, users can disable the affected functionality or restrict access to the bpf package. However, it is strongly advised to apply the official fix by updating the Linux Kernel as soon as possible.

Conclusion

The UAF vulnerability in the bpf package of the Linux Kernel can lead to arbitrary code execution or a DoS condition. It is crucial to update the kernel to version v5.17.2 or later to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The UAF vulnerability in the bpf package can allow an attacker to execute arbitrary code or cause a DoS condition, potentially compromising the security and stability of the 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 to the playground, and it will analyze and alert you if the vulnerability is present.

At the time of this report, there are no known public exploits targeting this specific vulnerability. However, it is crucial to apply the fix promptly to mitigate any potential risks.

Yes, this vulnerability can be exploited remotely if the affected functionality is exposed to the network. It is recommended to update the Linux Kernel to prevent any potential remote exploitation.

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