AI Science Tracker

o3 helps find a Linux kernel ksmbd use-after-free

Linux kernel (ksmbd SMB server) · AI involvement attributed to OpenAI o3

Finding and attribution

Independent researcher Sean Heelan reports a use-after-free of sess->user in the ksmbd session-logoff handler, reachable when a second connection binds to the same session. The fix removes the free in smb2pdu.c and is tagged for stable backporting.

Product: Linux kernel (ksmbd SMB server). AI system: OpenAI o3. Team / organization: Sean Heelan.

CVE identifiers: CVE-2025-37899.

AI and human contribution (source account): Heelan ran o3 through the API 100 times on about 12k lines of SMB handler code, with no scaffolding or tools. o3 reported the bug in some runs with a signal-to-noise ratio he puts near 1:50, and he identified the real finding himself and wrote the patch.

Human involvement is only described where the source account establishes it; unknown involvement does not mean none. Vendor confirmation of a flaw does not confirm every claim about AI contribution.

Discovery context: Per the author's account the bug was not previously known to him; the source does not independently show it was unknown to others.

Remediation status: fix documented. The kernel commit 2fc9feff45d9 (ksmbd: fix use-after-free in session logoff) authored by Heelan removes the faulty free. The kernel release containing it was not established here.

A source-documented fix does not establish installed patches or current safety. Source checking does not independently reproduce the finding or establish observed exploitation.

Disclosed 22 May 2025. AI attribution dated 22 May 2025. Sources checked 14 Nov 2026; these are separate dates, not a live installation check.

Recorded CVSS: High · highest recorded score 8.8. Documented technical effects: other.

Severity, consequences and exploitation evidence

Case grouping uses the highest recorded CVSS score, with its version-specific severity band. It is descriptive, not a combined or editorial risk index. All recorded assessments remain below; scores from different versions and sources may disagree. CVSS specifications define version-specific scoring and severity bands.

  • CVE-2025-37899: CVSS 3.1 · 8.8 (High) · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H · Assessment scenarios: AV:N - ksmbd is the in-kernel SMB server; both the freeing SMB2 LOGOFF and the racing SMB2 SESSION_SETUP (multichannel bind) are ordinary SMB PDUs delivered over TCP/445 from a remote client. No local access is required. AC:L - The attacker controls both sides of the race — they open both TCP connections and choose when to send LOGOFF and the binding SESSION_SETUP — and both paths block on slow ksmbd.mountd IPC round trips (`ksmbd_ipc_login_request()` / `ksmbd_ipc_logout_request()`), giving a very wide window that can be retried indefinitely with fresh sessions. PR:L - `smb2_session_logoff()` is gated by `ksmbd_conn_good()` and a successful `ksmbd_session_lookup_all()`, and channel binding requires a non-guest session, so the attacker needs one ordinary unprivileged SMB account (any share user, no admin rights) — matching the kernel CNA scoring of the sibling multichannel session UAFs CVE-2025-22040/22041. UI:N - The attacker drives both connections and both SMB requests entirely on their own; no action by any local user or administrator is needed. S:U - The corruption stays within the kernel's own memory and security authority — a standard in-kernel use-after-free with no crossing of a VM, IOMMU, or sandbox boundary. C:H - The freed `struct ksmbd_user` holds `name`, `passkey` and `passkey_sz`; after reclaim, `ksmbd_compare_user()` performs a `memcmp` of attacker-chosen length through a dangling pointer (unbounded OOB read usable as an oracle) and `smb2_query_info` FS_OBJECTID copies 16 bytes via `user_passkey(sess->user)` straight into the network response, disclosing kernel memory and the victim's NTLM passkey to the remote client. I:H - `set_user_flag(sess->user, KSMBD_USER_FLAG_BAD_PASSWORD)` performs an OR-write into the freed object, and `sess->user->uid`/`->gid` from freed memory drive `smb_inherit_dacl()` and file ownership; combined with heap spraying of the reclaimed slab object this yields a write primitive suitable for control-flow hijack. A:H - Dereferencing the freed `ksmbd_user` (and the `sess->user = NULL` store racing other readers) reliably produces kernel oopses, slab corruption, or a panic, taking down the file server.. Linux (CNA; CVE Program record) · checked 16 Nov 2026.

CVE-2025-37899: other.
Prerequisites / affected scope: A concurrent SMB session setup can use the session user object while another thread frees it during session logoff, creating a use-after-free. No further consequence established..
Exploitation evidence: Exploitation in the wild is not established by the cited description.. Impact source · checked 16 Nov 2026.

Documented fix: The kernel commit 2fc9feff45d9 (ksmbd: fix use-after-free in session logoff) authored by Heelan removes the faulty free. The kernel release containing it was not established here.

Original evidence

Download this source record (JSON)

Open this case in the interactive tracker · Browse all static security cases