UBUNTU-CVE-2026-89641: Use After Free
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In cifs_file_set_size(), set tcon = NULL immediately after cifsFileInfo_put() so the subsequent path-based operation takes the cifs_sb_tlink() path and acquires a fresh reference.