Use-after-free in Linux kernel - CVE-2026-31718

 

Use-after-free in Linux kernel - CVE-2026-31718

Published: May 2, 2026


Vulnerability identifier: #VU128985
CSH Severity: Medium
CVSS v4: 7.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-31718
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote user to cause a denial of service.

The vulnerability exists due to a use-after-free in __ksmbd_close_fd() when processing durable file handles that survive session disconnect and are later timed out by the durable scavenger. A remote user can trigger session disconnect without SMB2_LOGOFF and cause lock cleanup to access a freed connection object to cause a denial of service.

The issue occurs when a durable file handle is preserved for later reconnection and byte-range locks remain associated with the old connection.


Affected software

Linux kernel
Ubuntu
linux (Ubuntu package)
linux-hwe-6.17 (Ubuntu package)
linux-azure-fde-6.17 (Ubuntu package)
linux-raspi (Ubuntu package)
linux-azure-6.17 (Ubuntu package)
linux-nvidia-6.17 (Ubuntu package)
linux-oem-6.17 (Ubuntu package)
linux-azure (Ubuntu package)
linux-nvidia (Ubuntu package)

How to mitigate CVE-2026-31718

Install security update from vendor's repository.

Linux kernel - update to 7.0 rc3
linux (Ubuntu package) - addressed in versions 6.17.0-40.40, 7.0.0-27.27
linux-hwe-6.17 (Ubuntu package) - update to 6.17.0-40.40~24.04.1
linux-azure-fde-6.17 (Ubuntu package) - update to 6.17.0-1018.18~24.04.1
linux-raspi (Ubuntu package) - addressed in versions 6.17.0-1021.21, 7.0.0-1014.14
linux-azure-6.17 (Ubuntu package) - update to 6.17.0-1021.21~24.04.1
linux-nvidia-6.17 (Ubuntu package) - update to 6.17.0-1026.26
linux-oem-6.17 (Ubuntu package) - update to 6.17.0-1028.28
linux-azure (Ubuntu package) - addressed in versions 7.0.0-1009.9, 7.0.0-1010.10
linux-nvidia (Ubuntu package) - update to 7.0.0-1013.13

External References

Related Security Bulletins