CVE-2024-40908
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-40908 affects the Linux kernel's BPF subsystem, specifically related to the rawtp testrun interface. The vulnerability was discovered when syzbot reported a crash that occurs when a rawtp program executed through the testrun interface calls the bpfgetattachcookie helper or any other helper that touches the task->bpfctx pointer. The issue was identified on July 12, 2024 (NVD).

Technical details

The vulnerability stems from a missing run context setting in the BPF rawtp testrun callback. When a program attempts to access the task->bpfctx pointer through helpers like bpfgetattachcookie, it can lead to a crash due to the uninitialized context. The fix involves setting the run context (task->bpfctx pointer) for the testrun callback by adding proper initialization and cleanup of the bpftracerunctx structure (Kernel Commit).

Impact

The vulnerability can cause a system crash (denial of service) when exploited through the BPF subsystem's test_run interface. This affects systems running vulnerable versions of the Linux kernel that utilize BPF programs with specific helper functions (Ubuntu).

Mitigation and workarounds

The vulnerability has been fixed in various Linux kernel versions. Ubuntu has released patches for multiple versions including 24.04 LTS (6.8.0-44.44), 22.04 LTS (5.15.0-121.131), and others. Users should update their kernel to the patched versions. The fix involves properly setting the run context for the rawtp test_run callback (Ubuntu).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40258HIGH7
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-devel-matched
NoNoDec 04, 2025
CVE-2025-40259MEDIUM6.2
  • Linux KernelLinux Kernel
  • kernel-64k-devel
NoNoDec 04, 2025
CVE-2025-40264MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoNoDec 04, 2025
CVE-2025-40254MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-modules-partner
NoNoDec 04, 2025
CVE-2025-40253MEDIUM5.5
  • Linux KernelLinux Kernel
  • python3-perf
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management