CVE-2026-99289: ksmbd: fix app-instance non-durable supersede session UAF

Published Nov 16, 2026
·
Updated

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

ksmbd: fix app-instance non-durable supersede session UAF

ksmbdclosefdappinstanceid() supersedes a prior open that has the same AppInstanceId. It reaches that open's session through opinfo->sess. This pointer is not refcounted.

Session teardown detaches durable handles before it frees the session. It does not detach a non-durable open. That open still points at the session through opinfo->sess after the session is freed. Another session can supersede the open at the same time. The supersede then takes a write lock through the stale pointer, in the freed session's file table.

BUG: KASAN: slab-use-after-free in rawwritelock+0x71/0xd0 Call Trace: rawwritelock+0x71/0xd0 ksmbdclosefdappinstanceid+0xd9/0x670 [ksmbd] smb2open+0x3e10/0xd910 [ksmbd] Freed by task 212: ksmbdsessiondestroy+0x38d/0x480 [ksmbd]

Fix this by looking the session up by opinfo->sessionid. The lookup returns a reference, as smb2breakcollectchannels() does. Recheck that opinfo->sess still points at it before using it.

Do the lookup without mlock held. destroyprevioussession() takes mlock under the session table lock, and taking them in the other order here would deadlock.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In ksmbd_close_fd_app_instance_id(), look up the session by opinfo->session_id without holding m_lock, use the reference returned by the lookup, and avoid dereferencing opinfo->sess after session teardown.

Event History

Nov 16, 2026
CVE Published
via MITRE·09:59 AM
Data Sourced
via MITRE·09:59 AM
Description

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