CVE-2024-50140
Linux Kernel vulnerability analysis and mitigation

Overview

In the Linux kernel versions 6.4 through 6.11.6, a vulnerability was discovered in the task_tick_mm_cid() function. The issue occurs when KASAN and PREEMPT_RT are enabled, where calling task_work_add() may cause a sleeping function to be called from an invalid context (NVD, Kernel Patch).

Technical details

The vulnerability manifests when the scheduler tick (sched_tick()) acquires the rq->__lock and calls task_tick_mm_cid(), which then triggers a chain of function calls leading to page allocation attempts while holding a raw_spinlock_t. This violates the kernel's locking rules as sleeping is not allowed while holding raw spinlocks. The issue was introduced in kernel v6.4 by commit 223baf9d17f2 which aimed to fix a performance regression related to mm_cid (Kernel Patch).

Impact

When triggered, the vulnerability causes a kernel BUG report with the message 'sleeping function called from invalid context', potentially leading to system instability. The CVSS v3.1 base score is 5.5 (Medium) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD).

Mitigation and workarounds

The issue has been fixed by adding a new TWAF_NO_ALLOC flag to task_work_add() which enables calling kasan_record_aux_stack_noalloc() instead of kasan_record_aux_stack(). This prevents page allocation while holding the spinlock. Users should upgrade to kernel versions containing the fix (Kernel Patch).

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-71142N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoNoJan 14, 2026
CVE-2025-71137N/AN/A
  • Linux KernelLinux Kernel
  • linux-gcp
NoYesJan 14, 2026
CVE-2025-71135N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-core
NoNoJan 14, 2026
CVE-2025-71134N/AN/A
  • Linux KernelLinux Kernel
  • kernel-uki-virt
NoNoJan 14, 2026
CVE-2025-71133N/AN/A
  • Linux KernelLinux Kernel
  • kernel-modules-extra
NoYesJan 14, 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