Potential Header Compromise in bpftrace: CVE-2024-2313

bpftrace Updated 02 Oct 2025

Summary

10/03/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-2313: If kernel headers need to be extracted, bpftrace will attempt to load them from a temporary directory. Affects bpftrace versions < 0.21.0-1. Fixed in 0.21.0-1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

bpftrace is a high-level tracing language for Linux that allows users to write scripts to trace kernel and user-level events. It is widely used for performance analysis and debugging in various Linux distributions. The package is designed to facilitate the extraction of kernel headers, which are essential for tracing operations. However, a vulnerability has been identified that could allow unprivileged attackers to exploit the loading of compromised kernel headers from temporary directories.

Vulnerability Detail

The vulnerability identified as CVE-2024-2313 arises when bpftrace attempts to load kernel headers from a temporary directory. If an attacker has unprivileged access, they could manipulate this process to load malicious or compromised kernel headers. This could potentially lead to unauthorized access or manipulation of system operations, posing a significant security risk. It is important to note that Linux distributions that provide kernel headers by default are not affected by this vulnerability.

How To Fix

Minimum fixed version

0.21.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade bpftrace

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using bpftrace in environments where kernel headers are not securely managed. Additionally, ensure that the temporary directories used by bpftrace are secured and not writable by unprivileged users.

Conclusion

In summary, CVE-2024-2313 poses a significant risk to systems using bpftrace due to the potential for unprivileged attackers to load compromised kernel headers. It is crucial to update to the patched version 0.21.0-1 or later to mitigate this risk. Users should also consider implementing workarounds to secure their environments.

See every vulnerability recorded for bpftrace →

Share this vulnerability

FAQ

CVE-2024-2313 is a vulnerability in the bpftrace package that allows unprivileged attackers to load compromised kernel headers from temporary directories.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The primary risk is that an attacker could gain unauthorized access or manipulate system operations by loading malicious kernel headers.

You can update bpftrace by running 'sudo apt-get update && sudo apt-get install bpftrace' in your terminal to install the patched version.

Yes, Linux distributions that provide kernel headers by default are not affected by this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for bpftrace.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.21.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade bpftrace

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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