Skip to content

Commit c6737c5

Browse files
committed
cifs: fix lease break oops in xfstest generic/098
jira VULN-131073 cve-pre CVE-2025-38527 commit-author Steve French <stfrench@microsoft.com> commit c774e67 umount can race with lease break so need to check if tcon->ses->server is still valid to send the lease break response. Reviewed-by: Bharath SM <bharathsm@microsoft.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Fixes: 59a556a ("SMB3: drop reference to cfile before sending oplock break") Signed-off-by: Steve French <stfrench@microsoft.com> (cherry picked from commit c774e67) Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
1 parent c99359e commit c6737c5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fs/cifs/file.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5112,9 +5112,13 @@ void cifs_oplock_break(struct work_struct *work)
51125112
* disconnected since oplock already released by the server
51135113
*/
51145114
if (!oplock_break_cancelled) {
5115-
rc = tcon->ses->server->ops->oplock_response(tcon, persistent_fid,
5115+
/* check for server null since can race with kill_sb calling tree disconnect */
5116+
if (tcon->ses && tcon->ses->server) {
5117+
rc = tcon->ses->server->ops->oplock_response(tcon, persistent_fid,
51165118
volatile_fid, net_fid, cinode);
5117-
cifs_dbg(FYI, "Oplock release rc = %d\n", rc);
5119+
cifs_dbg(FYI, "Oplock release rc = %d\n", rc);
5120+
} else
5121+
pr_warn_once("lease break not sent for unmounted share\n");
51185122
}
51195123

51205124
cifs_done_oplock_break(cinode);

0 commit comments

Comments
 (0)