Race Condition Vulnerability in ksmbd of Linux Kernel - CVE-2025-40039

linux Updated 04 Nov 2025

Summary

28/10/2025
N/A
No i
Unrated
Not published

DEBIAN-CVE-2025-40039: In the Linux kernel, the following vulnerability has been resolved: ksmbd: Fix race condition in RPC handle list access The 'sess->rpc_handle_list' XArray manages RPC handles within a ksmbd session. Affects linux versions 6.1.106-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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Linux kernel is a core component of many operating systems, providing essential services for hardware management, process control, and system security. It includes various subsystems, one of which is ksmbd, a server that implements the SMB protocol for file sharing. This vulnerability affects the ksmbd subsystem, specifically in the management of RPC handles, which are critical for session management and data integrity.

Vulnerability Detail

In the Linux kernel's ksmbd subsystem, a race condition vulnerability exists due to improper locking mechanisms when accessing the 'sess->rpc_handle_list' XArray. The issue arises from the use of a read lock during modifications, which can lead to data corruption and inconsistent reads. Specifically, the functions ksmbd_session_rpc_open() and ksmbd_session_rpc_method() fail to adequately protect against concurrent access, potentially resulting in use-after-free errors and data integrity issues.

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 patch as soon as it is available.

Conclusion

The CVE-2025-40039 vulnerability in the ksmbd subsystem of the Linux kernel poses significant risks due to improper locking mechanisms leading to race conditions. It is essential to update the affected Linux packages to ensure system integrity and security.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2025-40039 is a vulnerability in the ksmbd subsystem of the Linux kernel that allows for potential race conditions due to improper locking mechanisms.

This vulnerability can lead to data corruption, inconsistent reads, and potential use-after-free errors, which may compromise system stability and security.

The vulnerability affects Linux versions in Debian 12, 13, and 14.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

While there are no specific workarounds, it is crucial to prioritize applying the patch once available to mitigate the risks associated with this vulnerability.

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