Bug 2367574 (CVE-2025-37952) - CVE-2025-37952 kernel: ksmbd: Fix UAF in __close_file_table_ids
Summary: CVE-2025-37952 kernel: ksmbd: Fix UAF in __close_file_table_ids
Keywords:
Status: NEW
Alias: CVE-2025-37952
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-20 17:01 UTC by OSIDB Bzimport
Modified: 2025-05-21 06:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-20 17:01:35 UTC
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.

Comment 1 Avinash Hanwate 2025-05-21 06:49:16 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025052001-CVE-2025-37952-299d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.