CVE-2025-39697 in Linuxinfo

Summary

by MITRE • 09/05/2025

In the Linux kernel, the following vulnerability has been resolved:

NFS: Fix a race when updating an existing write

After nfs_lock_and_join_requests() tests for whether the request is still attached to the mapping, nothing prevents a call to nfs_inode_remove_request() from succeeding until we actually lock the page group. The reason is that whoever called nfs_inode_remove_request() doesn't necessarily have a lock on the page group head.

So in order to avoid races, let's take the page group lock earlier in nfs_lock_and_join_requests(), and hold it across the removal of the request in nfs_inode_remove_request().

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 02/09/2026

The vulnerability identified as CVE-2025-39697 represents a critical race condition within the Linux kernel's Network File System implementation that could potentially lead to data corruption or system instability. This flaw exists in the nfs_lock_and_join_requests() function where the kernel fails to properly synchronize access to page group structures during concurrent NFS write operations. The issue stems from a temporal gap between when the function tests if a request is still attached to the mapping and when it actually locks the page group, creating an opportunity for concurrent execution paths to interfere with each other.

The technical root cause of this vulnerability lies in the improper ordering of synchronization primitives within the NFS subsystem. When nfs_lock_and_join_requests() performs its initial test for request attachment to the mapping, it does not yet hold the page group lock that would prevent other threads from calling nfs_inode_remove_request() and removing the request from the mapping. This race condition occurs because the calling thread that initiates nfs_inode_remove_request() may not possess the necessary lock on the page group head, allowing for concurrent modification of the request structure. The vulnerability manifests when multiple threads attempt to process write requests simultaneously, with one thread potentially removing a request while another is attempting to join or update it, leading to inconsistent state management.

This race condition has significant operational impact on systems relying on NFS for file operations, particularly in environments where concurrent write access is common such as database servers, file servers, or distributed computing environments. The potential consequences include data corruption, inconsistent file states, and in extreme cases, system crashes or denial of service conditions that could affect multiple concurrent users or applications. The vulnerability is particularly concerning because it operates at the kernel level within the core NFS implementation, meaning that any process accessing NFS shares could potentially trigger the race condition. From an ATT&CK perspective, this represents a privilege escalation vector through system instability and data integrity compromise, while CWE classification would place it under CWE-362 for race conditions in the kernel context.

Mitigation strategies for this vulnerability require immediate patch application from Linux kernel maintainers, as the fix involves reordering synchronization primitives within the nfs_lock_and_join_requests() function to acquire the page group lock before performing the request attachment test. System administrators should prioritize updating their kernel versions to include the resolved patch, particularly in production environments where NFS is heavily utilized. Additionally, monitoring for unusual NFS behavior or file system errors may help detect potential exploitation attempts. Organizations should also consider implementing additional safeguards such as limiting concurrent NFS access where possible, though the primary defense remains the kernel-level patch that addresses the fundamental race condition by ensuring proper lock ordering and maintaining consistency between request removal and page group access operations.

Responsible

Linux

Reservation

04/16/2025

Disclosure

09/05/2025

Moderation

accepted

CPE

ready

EPSS

0.00132

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!