| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-37952: ksmbd: Fix UAF in __close_file_table_ids |
| |
| 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 |
| =========================== |
| |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.6.91 with commit fec1f9e9a650e8e7011330a085c77e7bf2a08ea9 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.12.29 with commit 9e9841e232b51171ddf3bc4ee517d5d28dc8cad6 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.14.7 with commit 16727e442568a46d9cca69fe2595896de86e120d |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.15 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 |