data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2026-64140 in the interactive tracker

CVE-2026-64140

ksmbd: fix null pointer dereference in proc_show_files()

7.5 EPSS 0.5% AV:N

Published 2026-07-19 (3 months ago) by the Linux kernel CNA. Subsystem fs/smb. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2026-64140 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixienot affected6.12.113-1Nothing to do. trixie never shipped the vulnerable code.
Debian 14forkyfixed7.0.12-1Update the kernel and reboot. Fixed in 7.0.12-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.0.12-1Update the kernel and reboot. Fixed in 7.0.12-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

When a SMB2 client opens a file with a durable v2 handle and then issues SMB2 SESSION_LOGOFF, session_fd_check() clears fp->tcon = NULL on the reconnectable file pointer but leaves the fp registered in global_ft.idr until the durable scavenger fires (up to fp->durable_timeout seconds later). During that window any read of /proc/fs/ksmbd/files (mode 0400) panics the kernel because proc_show_files() walks global_ft.idr and unconditionally dereferences fp->tcon->id with no NULL guard. Reproducer requires only a successful SMB2 SESSION_SETUP and a share configured with 'durable handles = yes'. KASAN report on mainline 70390501d194: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:proc_show_files+0x118/0x740 Call Trace: proc_show_files+0x118/0x740 seq_read_iter+0x4ef/0xe10 proc_reg_read_iter+0x1b7/0x280 ... Guard the dereference. A durable-disconnected fp legitimately has no tcon; report its tree id as 0 rather than oopsing.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

fs/smb/server/vfs_cache.c

What this is
KERNEL SMB3 SERVER (KSMBD)MAINTAINERS section matched on fs/smb/server/ · linux-cifs@vger.kernel.org · Maintained
Kernel module
ksmbd

Check it on the machine

grep -wE 'CONFIG_SMBFS|CONFIG_SMB_SERVER' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w ksmbd

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.

  • bookworm, trixie, forky, sidm
m
a loadable module on every flavour - check lsmod, can be blacklisted
Build switches
CONFIG_SMBFS, CONFIG_SMB_SERVER
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2026-07-19 (3 months ago)source
CVSS
7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hsource recompute it
Attack vector
network (AV:N)source
EPSS
0.49%, higher than 40.6% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
fs/smb

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
7.07.0.118eab081627b6
7.07.1904901561e61

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:NAttack vector, network
The poisoned durable-handle state is created remotely over ksmbd's TCP/445 SMB2 path (SESSION_SETUP, TREE_CONNECT, CREATE with durable v2, SESSION_LOGOFF); ksmbd is a network-facing in-kernel SMB server per kernel CVSS guidance.
AC:LAttack complexity, low
An attacker fully controls the SMB2 sequence that leaves `fp->tcon = NULL` while the file remains in `global_ft.idr`; once that state exists, any read of `/proc/fs/ksmbd/files` deterministically oopses, and the window lasts up to `fp->durable_timeout` seconds (repeatable).
PR:NPrivileges required, none
Exploitation requires only network reachability to ksmbd plus a successful SMB2 SESSION_SETUP (guest or any configured share account); no host root or kernel capabilities are needed on the attacker side to plant the corrupt durable-handle entry.
UI:NUser interaction, none
No victim user action (opening files, mounting shares, clicking links) is required; the crash is triggered by kernel procfs iteration, not by end-user interaction.
S:UScope, unchanged
Impact is a kernel NULL pointer dereference/panic within the ksmbd/kernel security authority; it does not cross VM, IOMMU, or sandbox boundaries.
C:NConfidentiality impact, none
This is a pure NULL pointer dereference at `fp->tcon->id` with no out-of-bounds read, UAF, or other memory corruption that could leak kernel data.
I:NIntegrity impact, none
The bug is a read of address 0 through a NULL `fp->tcon` pointer; it provides no write primitive, type confusion, or control-flow hijack opportunity.
A:HAvailability impact, high
Unconditional dereference of NULL `fp->tcon` in `proc_show_files()` causes a kernel general protection fault/oops (KASAN null-ptr-deref), crashing or severely disrupting the host.