CVE-2024-42305
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-42305 affects the Linux kernel's ext4 filesystem implementation. The vulnerability was discovered in the makeindexeddir() function where it incorrectly assumes that the first two entries of the dirblock must be dot and dotdot. This assumption can lead to out-of-bounds access when processing directory entries (Kernel Git).

Technical details

The vulnerability occurs during directory indexing when renaming a directory entry increases its namelen length. When neither hole nor free space is sufficient to hold the new dentry, makeindexed_dir() is called. The function incorrectly processes directory entries by treating arbitrary entries as dot and dotdot, leading to a situation where only one valid dentry exists for block splitting. This results in split==0 and causes out-of-bounds access to the map array with index 4294967295 (Kernel Git).

Impact

The vulnerability can lead to a kernel crash (denial of service) when exploited, as demonstrated by the reported page fault and system oops in the kernel logs. The issue affects systems using the ext4 filesystem with directory indexing enabled (Kernel Git).

Mitigation and workarounds

The issue has been fixed by adding the ext4checkdx_root() helper function that performs sanity checks on dot and dotdot entries before starting the directory conversion process. Users should update to patched kernel versions that include this fix (Kernel Git).

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-40343MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-riscv
NoYesDec 09, 2025
CVE-2025-40342MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-azure-5.4
NoYesDec 09, 2025
CVE-2025-40341MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-debug-uki-virt-addons
NoYesDec 09, 2025
CVE-2025-40345N/AN/A
  • Linux KernelLinux Kernel
  • bpftool
NoYesDec 12, 2025
CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • rtla
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