Critical Sleeping Function Vulnerability in Linux Kernel - CVE-2024-40915

linux Updated 02 Oct 2025

Summary

12/07/2024
N/A
No i
Unrated
Not published

CVE-2024-40915: In the Linux kernel, the following vulnerability has been resolved: riscv: rewrite kernel_map_pages() to fix sleeping in invalid context kernel_map_pages() is a debug function which clears the valid bit in page table ent... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Linux kernel is the core component of many operating systems, responsible for managing hardware resources and providing essential services to software applications. It is designed for efficiency, stability, and security. However, vulnerabilities can arise, such as CVE-2024-40915, which affects the kernel's memory management functions, specifically in the RISC-V architecture.

Vulnerability Detail

CVE-2024-40915 is a vulnerability in the Linux kernel that arises from the improper handling of the __kernel_map_pages() function. This function is intended for debugging purposes, clearing the valid bit in page table entries for deallocated pages to detect illegal memory accesses. However, it calls __set_memory(), which acquires a semaphore that can sleep. Since __kernel_map_pages() can be invoked in atomic contexts, this leads to illegal sleeping, potentially causing system instability and crashes. The vulnerability is particularly critical as it can be exploited in environments where memory management is crucial.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to apply the necessary updates as soon as they are available.

Conclusion

CVE-2024-40915 is a significant vulnerability in the Linux kernel that can lead to serious system issues due to improper memory management. Users are advised to update their systems to the latest kernel versions to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2024-40915 is a vulnerability in the Linux kernel related to improper handling of memory management functions, which can lead to system instability.

You can check if your system is affected by using tools like Vulert, which monitors open-source vulnerabilities in real-time based on your manifest file.

Exploitation of this vulnerability can lead to system crashes and instability, particularly in environments that rely heavily on memory management.

You can update your Linux kernel using your package manager. For Debian systems, use 'apt-get upgrade linux' after ensuring your package list is updated.

Currently, there are no specific workarounds available. The recommended action is to apply the updates as soon as they are released.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback