CVE-2024-38566
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-38566 addresses a vulnerability in the Linux kernel's BPF verifier component. The issue stems from incorrect assumptions about the 'sk' field in 'struct socket', where the verifier assumes it is valid and non-NULL when the 'socket' pointer itself is trusted and non-NULL. However, this assumption may not hold true in cases where a socket was just created and passed to the LSM socket_accept hook (Kernel Commit).

Technical details

The vulnerability lies in the BPF verifier's handling of socket structures. The verifier incorrectly assumes that when a socket pointer is trusted and non-NULL, its 'sk' field must also be valid and non-NULL. This assumption breaks down specifically in the context of newly created sockets being passed to the LSM socket_accept hook. The fix involves modifying the verifier's type system to properly handle cases where the 'sk' field might be NULL, even when the parent socket pointer is trusted (Kernel Commit).

Impact

The vulnerability could potentially lead to incorrect verifier decisions regarding socket field access, which might affect the security guarantees provided by the BPF verifier in the Linux kernel. This could impact systems using BPF programs that interact with socket structures, particularly in LSM (Linux Security Module) contexts (Ubuntu Security).

Mitigation and workarounds

The vulnerability has been fixed in the Linux kernel through a patch that corrects the verifier's assumptions about socket->sk field access. The fix has been backported to various stable kernel versions and is available in Ubuntu 24.04 LTS (noble) and other distributions. Users should update their systems to the patched kernel versions (Ubuntu Security).

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-40344N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-modules-internal
NoYesDec 09, 2025
CVE-2025-40343N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel
NoYesDec 09, 2025
CVE-2025-40342N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesDec 09, 2025
CVE-2025-40341N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-modules-extra
NoYesDec 09, 2025
CVE-2025-40340N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoYesDec 09, 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