CVE-2026-89641: cifs: clear tcon after cifsFileInfo_put() in cifs_file_set_size()

Published Sep 11, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

cifs: clear tcon after cifsFileInfoput() in cifsfilesetsize()

When the else branch of cifsfilesetsize() finds a writable file handle via findwritablefile(), it borrows tcon and server from the handle's tlink, attempts the handle-based setfilesize() RPC, and then releases the handle with cifsFileInfoput().

If setfilesize() fails, execution falls through to the path-based fallback, which reuses the borrowed tcon and server under the "if (tcon == NULL)" guard. Since tcon is not NULL at that point, the guard is skipped. If cifsFileInfoput() dropped the last reference on a tlink that was already removed from the tlink tree (TCONLINKINTREE cleared, as happens during reconnection or session teardown), cifsputtlink() will have freed tcon; the subsequent setpathsize() call is then a use-after-free.

Setting tcon = NULL after cifsFileInfoput() causes the existing guard to take the cifssbtlink() path, which acquires a fresh reference for the path-based operation or fails cleanly if the session is gone.

Affected Software

1 affected component
Linux Kernel

Event History

Sep 11, 2026
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
Description

Frequently Asked Questions

1

What conditions are required for the use-after-free to occur?

A writable CIFS file handle must be found, the handle-based set_file_size() RPC must fail, and releasing that handle must drop the last reference to a tlink that has already been removed during reconnection or session teardown. The subsequent path-based size update can then reuse a freed tcon.

2

Which systems are most exposed to this race?

Systems using the Linux kernel CIFS client are exposed when they perform file-size changes through writable handles while CIFS reconnection or session teardown is occurring. The failure path of the handle-based size-setting RPC is also required.

3

What does the resolved change do to prevent the issue?

It clears tcon after cifsFileInfo_put(), forcing the path-based fallback to acquire a fresh tlink reference through cifs_sb_tlink(). If the session is no longer available, that fallback fails cleanly instead of using the released connection object.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203