PT-2025-44107 · Linux+3 · Linux Kernel+3

Published

2025-10-28

·

Updated

2026-05-26

·

CVE-2025-40039

CVSS v3.1

4.7

Medium

VectorAV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions Linux kernel (affected versions not specified)
Description A race condition exists in the handling of RPC handles within a ksmbd session due to flawed locking implementation. Specifically, the sess->rpc handle list XArray, which manages these handles, was not consistently protected by the intended sess->rpc lock (an rw semaphore). The ksmbd session rpc open() function incorrectly acquired only a read lock before performing modifications to the XArray using xa store() and xa erase(), requiring a write lock for exclusive access. Additionally, ksmbd session rpc method() accessed the list using xa load() without holding any lock, potentially leading to inconsistent data reads or a use-after-free condition. The issue is addressed by ensuring correct write lock acquisition in ksmbd session rpc open() using down write() and up write(), and by adding read lock protection in ksmbd session rpc method() using down read() and up read().
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Race Condition

Weakness Enumeration

Related Identifiers

AZL-78383
CVE-2025-40039
ECHO-B60B-14F3-64C7
OPENSUSE-SU-2025:15702-1
OPENSUSE-SU-2026:10301-1
USN-8029-1
USN-8029-2
USN-8029-3
USN-8030-1
USN-8048-1
USN-8278-1
USN-8278-2
USN-8289-1
USN-8289-2
USN-8296-1
USN-8296-2

Affected Products

Debian
Linuxmint
Linux Kernel
Ubuntu