CVE-2026-74522: ksmbd: fix use-after-free in __close_file_table_ids()
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix use-after-free in closefiletableids()
A ksmbdfile can remain alive after logical close while another session holds a temporary reference obtained through ksmbdlookupfdinode(). ksmbdclosefd() currently marks the file closed and drops the idr-owned reference, but leaves the pointer published in the closing session's idr until the final reference is dropped.
If the foreign holder performs the final ksmbdfdput(), putfdfinal() supplies the foreign session's file table to ksmbdclosefd(). The object is then freed without being removed from its owner's idr, and the owner session later dereferences the stale pointer during file-table teardown.
Remove the volatile id from the owner's idr while ksmbdclosefd() still holds that table's lock, and clear volatileid before dropping the idr-owned reference. A later foreign final put then only performs physical destruction and cannot remove the object from the wrong table.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-74522?
CVE-2026-74522 has a risk score of 47, indicating a moderate severity level.
How do I fix CVE-2026-74522?
To fix CVE-2026-74522, ensure that your Linux kernel is updated to the latest version where the vulnerability has been resolved.
What systems are affected by CVE-2026-74522?
CVE-2026-74522 affects systems running vulnerable versions of the Linux kernel with ksmbd.
What type of vulnerability is CVE-2026-74522?
CVE-2026-74522 is categorized as a Use After Free vulnerability.
What is the impact of CVE-2026-74522?
The impact of CVE-2026-74522 could potentially allow for unauthorized access or control due to improper memory handling.