# CVE-2026-89635: ksmbd: only rebind the reopened file's own oplock on durable reconnect

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.55% (percentile 40, 2026-11-26)
- **Published:** 2026-09-11T19:45:29.551Z
- **Modified:** 2026-10-19T09:18:00.543Z

## Who should check

- Anyone running Linux \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 74e3ef4630f004c0de40c0540648a5a4033c6c9d; \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7
- Anyone running Linux 7.2

## Description

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

ksmbd: only rebind the reopened file's own oplock on durable reconnect

ksmbd\_reopen\_durable\_fd() walks the inode's m\_op\_list and rebinds every
detached oplock to the reconnecting session:

	list\_for\_each\_entry\_rcu(op, &ci-\>m\_op\_list, op\_entry,
				lockdep\_is\_held(&ci-\>m\_lock)) {
		if (op-\>conn)
			continue;
		op-\>conn = ksmbd\_conn\_get(fp-\>conn);
		op-\>sess = work-\>sess;
	}

The only key is op-\>conn == NULL, which every detached durable handle on
that inode matches, not just the one owned by fp.  When two sessions hold
durable handles on the same file and both disconnect, reconnecting one of
them adopts the other session's oplock: op-\>sess is overwritten with the
reconnecting session without taking a reference on it, while op-\>conn
pins the connection.

The sibling teardown path, session\_fd\_check(), keys on the identity of
the connection being torn down (op-\>conn == conn) rather than on shared
state, and so does not have this problem.

Once the adopting session is destroyed, ksmbd\_session\_destroy() frees it
while the foreign oplock still points at it.  The reader in
ksmbd\_close\_fd\_app\_instance\_id() validates only opinfo-\>conn, which is
still live thanks to the reference taken above, and then dereferences the
stale session:

	if (!opinfo-\>conn) {
		up\_read(&fp-\>f\_ci-\>m\_lock);
		goto out;
	}

	ft = &opinfo-\>sess-\>file\_table;
	write\_lock(&ft-\>lock);

  BUG: KASAN: slab-use-after-free in \_raw\_write\_lock+0x74/0xd0
  Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9
  Workqueue: ksmbd-io handle\_ksmbd\_work
  Call Trace:
   \_raw\_write\_lock+0x74/0xd0
   ksmbd\_close\_fd\_app\_instance\_id+0x183/0x410
   smb2\_open+0x1346/0x4430
   handle\_ksmbd\_work+0x2bb/0x7b0

Reached from an authenticated session against a share with the default
durable-handle and oplock configuration: two sessions open the same file
with a durable-v2 handle and an RH lease under distinct AppInstanceIds,
both log off, one reconnects with DH2C, and a later durable-v2 create
carrying the other AppInstanceId walks into the freed session.

Constrain the loop to the oplock owned by the file being reopened.

## Affected and fixed versions

- Linux: \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 74e3ef4630f004c0de40c0540648a5a4033c6c9d; \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7 (cvelist)
- Linux: 7.2 (cvelist)

## Mitigation

- Upgrade Linux to 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89635. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89635.md
Affected: Linux >= f363a0fb134a3eb9e47368b1edbd251fd76be84b, < 74e3ef4630f004c0de40c0540648a5a4033c6c9d; >= f363a0fb134a3eb9e47368b1edbd251fd76be84b, < 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7; Linux 7.2
Fixed in: Linux 74e3ef4630f004c0de40c0540648a5a4033c6c9d, Linux 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89635 being exploited?

There is no confirmed exploitation: CVE-2026-89635 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.55% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89635?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-89635?

Linux \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 74e3ef4630f004c0de40c0540648a5a4033c6c9d; \>= f363a0fb134a3eb9e47368b1edbd251fd76be84b, \< 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7; Linux 7.2.

### Is there a fix for CVE-2026-89635?

Yes. Fixed in Linux 74e3ef4630f004c0de40c0540648a5a4033c6c9d, Linux 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7. Upgrade Linux to 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7 or later.

### How do I check if I'm affected by CVE-2026-89635?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/74e3ef4630f004c0de40c0540648a5a4033c6c9d>
- other: <https://git.kernel.org/stable/c/3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89635>

HTML: <https://flawdb.com/CVE-2026-89635> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89635>
