PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2024-41012: 
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-41012 is a security vulnerability in the Linux kernel's file locking mechanism, discovered and disclosed on July 23, 2024. The vulnerability affects Linux kernel versions from 2.6.13 up to (excluding) 6.9.9, including various release candidates of version 6.10. The issue occurs in the filelock subsystem when fcntl_setlk() races with close() operations (NVD).

Technical details

The vulnerability arises when fcntl_setlk() races with close() operations, where it attempts to remove the created lock using do_lock_file_wait(). Linux Security Modules (LSMs) can allow the first do_lock_file_wait() that created the lock while denying the second do_lock_file_wait() that attempts to remove the lock. Additionally, posix_lock_file() could fail to remove a lock due to GFP_KERNEL allocation failure when splitting a range in the middle. The vulnerability has been assigned a CVSS v3.1 base score of 6.3 (MEDIUM) with vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H (NVD).

Impact

After the bug is triggered, use-after-free reads occur in lock_get_status() when userspace reads /proc/locks. This vulnerability can potentially be exploited to read arbitrary kernel memory, although it cannot be used to corrupt kernel memory. The issue specifically affects systems with SELinux, Smack, AppArmor, or BPF-LSM in enforcing mode and only works from certain security contexts (Kernel Patch).

Exploitability

The vulnerability requires local access and high complexity to exploit. It needs low privileges and no user interaction. The exploit potential is limited to systems running affected Linux kernel versions with specific security modules in enforcing mode. The vulnerability has been classified as CWE-416 (Use After Free) (NVD).

Mitigation and workarounds

The vulnerability has been fixed by modifying the code to call locks_remove_posix() instead of using do_lock_file_wait() for lock removal. This function is specifically designed to reliably remove POSIX locks associated with the given file and files_struct, similar to the mechanism used by filp_flush(). Users should update their Linux kernel to the latest patched version (Kernel Patch).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux: 6.1.106-1

Fixed

bullseye

linux-6.1: 6.1.119-1~deb11u1

Fixed

sid

linux: 6.9.9-1

Fixed

trixie

linux: 6.9.9-1

Fixed

Source: This report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-99082HIGH8.8
  • Linux Kernel logoLinux Kernel
  • kernel
NoYesOct 23, 2026
CVE-2026-99081HIGH7.5
  • Linux Kernel logoLinux Kernel
  • linux-docs
NoYesOct 23, 2026
CVE-2026-99087NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux
NoYesOct 23, 2026
CVE-2026-99086NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux
NoYesOct 23, 2026
CVE-2026-99085NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel6.12
NoNoOct 23, 2026

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