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

Look up another CVE · open CVE-2025-22037 in the interactive tracker

CVE-2025-22037

ksmbd: fix null pointer dereference in alloc_preauth_hash()

7.5 EPSS 69.5% AV:N

Published 2025-04-16 (18 months ago) by the Linux kernel CNA. Subsystem fs/smb. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2025-22037 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 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

The Client send malformed smb2 negotiate request. ksmbd return error response. Subsequently, the client can send smb2 session setup even thought conn->preauth_info is not allocated. This patch add KSMBD_SESS_NEED_SETUP status of connection to ignore session setup request if smb2 negotiate phase is not complete.

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/connection.h
fs/smb/server/mgmt/user_session.c
fs/smb/server/smb2pdu.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
2025-04-16 (18 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
69.51%, higher than 99.4% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
fs/smb

Upstream fixes

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

IntroducedFixed inCommit
5.156.6.107cce57cd8c5de
5.156.12.23ca8bed31edf7
5.156.13.118f216b33a5e1
5.156.14.2b8eb243e670e
5.156.15c8b5b7c5da7d

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
ksmbd is the in-kernel SMB server processing attacker-supplied SMB2 NEGOTIATE and SESSION_SETUP PDUs from any remote client on TCP/445. The entire trigger sequence consists of network packets sent over a single TCP connection.
AC:LAttack complexity, low
The attacker fully controls all three PDUs and the sequence is deterministic — a valid SMB 3.1.1 negotiate, a second negotiate with no preauth-integrity context, then a session setup — with no race, timing, or memory-layout dependency.
PR:NPrivileges required, none
SMB2_SESSION_SETUP_HE is explicitly exempted from session validation in smb2_check_user_session(), and the crash occurs in generate_preauth_hash() before any credential is verified. No account or authentication on the SMB server is required.
UI:NUser interaction, none
The attacker drives the whole sequence by connecting to the listening ksmbd socket; no action by an administrator, local user, or SMB client is needed.
S:UScope, unchanged
The NULL dereference occurs in kernel context within the ksmbd connection handler and its impact is confined to the kernel's own security authority, with no crossing into a hypervisor, IOMMU, or sandbox boundary.
C:NConfidentiality impact, none
The faulting access is a fixed read of offsetof(struct preauth_integrity_info, Preauth_HashValue) from a NULL pointer, which faults immediately; no data is copied out and no attacker-controlled offset exists to turn it into a disclosure primitive.
I:NIntegrity impact, none
The bug is a read-side NULL dereference in kmemdup() with no out-of-bounds or freed-object write, so no kernel memory or control-flow state can be modified.
A:HAvailability impact, high
An unauthenticated remote client reliably triggers a kernel oops in the ksmbd worker while conn->srv_mutex is held and conn->r_count is outstanding, leaving the connection permanently stuck and the server unable to reclaim it; on kernels with panic_on_oops this is an immediate full system panic.