[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025052001-CVE-2025-37952-299d@gregkh>
Date: Tue, 20 May 2025 18:02:06 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-37952: ksmbd: Fix UAF in __close_file_table_ids
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Fix UAF in __close_file_table_ids
A use-after-free is possible if one thread destroys the file
via __ksmbd_close_fd while another thread holds a reference to
it. The existing checks on fp->refcount are not sufficient to
prevent this.
The fix takes ft->lock around the section which removes the
file from the file table. This prevents two threads acquiring the
same file pointer via __close_file_table_ids, as well as the other
functions which retrieve a file from the IDR and which already use
this same lock.
The Linux kernel CVE team has assigned CVE-2025-37952 to this issue.
Affected and fixed versions
===========================
Fixed in 6.6.91 with commit fec1f9e9a650e8e7011330a085c77e7bf2a08ea9
Fixed in 6.12.29 with commit 9e9841e232b51171ddf3bc4ee517d5d28dc8cad6
Fixed in 6.14.7 with commit 16727e442568a46d9cca69fe2595896de86e120d
Fixed in 6.15-rc6 with commit 36991c1ccde2d5a521577c448ffe07fcccfe104d
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-37952
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/smb/server/vfs_cache.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/fec1f9e9a650e8e7011330a085c77e7bf2a08ea9
https://git.kernel.org/stable/c/9e9841e232b51171ddf3bc4ee517d5d28dc8cad6
https://git.kernel.org/stable/c/16727e442568a46d9cca69fe2595896de86e120d
https://git.kernel.org/stable/c/36991c1ccde2d5a521577c448ffe07fcccfe104d
Powered by blists - more mailing lists