---
id: "CVE-2026-99289"
page: "https://infrastack.ai/live/CVE-2026-99289"
kind: "vulnerability"
aliases: ["CVE-2026-99289"]
title: "Linux kernel ksmbd: use-after-free when superseding SMB app-instance opens"
severity: "unknown"
cvss: null
epss: 0.00198
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["file-server", "ksmbd", "linux-kernel", "runtime", "smb"]
not_affected_if: ["ksmbd-not-enabled"]
published_at: "2026-11-16T10:17:00+00:00"
first_seen_at: "2026-11-16T10:39:25+00:00"
updated_at: "2026-11-16T18:53:18+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99289", "first_seen_at": "2026-11-16T10:39:25+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-99289", "first_seen_at": "2026-11-16T18:53:18+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00198, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-99289"}]
---

# Linux kernel ksmbd: use-after-free when superseding SMB app-instance opens

Link for people: https://infrastack.ai/live/CVE-2026-99289 (this .md is for agents)

A flaw in the Linux kernel's ksmbd SMB server lets a session reach freed memory when another session supersedes a non-durable open with the same AppInstanceId. The sources describe a use-after-free that can be triggered during SMB2 open handling, with the freed memory then written to.

_Summary, check and fix written by a model from the sources; labelled as such._

## Timeline

- 2026-11-16T10:39:25+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-99289
- 2026-11-16T18:53:18+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-99289

## From the sources

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

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

ksmbd_close_fd_app_instance_id() 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 _raw_write_lock+0x71/0xd0
  Call Trace:
   _raw_write_lock+0x71/0xd0
   ksmbd_close_fd_app_instance_id+0xd9/0x670 [ksmbd]
   smb2_open+0x3e10/0xd910 [ksmbd]
  Freed by task 212:
   ksmbd_session_destroy+0x38d/0x480 [ksmbd]

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

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

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
