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

Look up another CVE · open CVE-2024-49988 in the interactive tracker

CVE-2024-49988

ksmbd: add refcnt to ksmbd_conn struct

8.8 EPSS 0.6% AV:N

Published 2024-10-21 (24 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-2024-49988 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.11.4-1Update the kernel and reboot. Fixed in 6.11.4-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.11.4-1Update the kernel and reboot. Fixed in 6.11.4-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.11.4-1Update the kernel and reboot. Fixed in 6.11.4-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

When sending an oplock break request, opinfo->conn is used, But freed ->conn can be used on multichannel. This patch add a reference count to the ksmbd_conn struct so that it can be freed when it is no longer used.

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.c
fs/smb/server/connection.h
fs/smb/server/oplock.c
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
2024-10-21 (24 months ago)source
CVSS
8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
network (AV:N)source
EPSS
0.62%, higher than 48.5% 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.5518f06bacc197
5.156.10.149fd3cde4628b
5.156.11.3e9dac92f4482
5.156.12ee426bfb9d09

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 vulnerable code is in the in-kernel SMB server (fs/smb/server/), driven entirely by SMB2/3 traffic on TCP/445 — the attacker triggers it by opening connections, binding a second channel, dropping the first, and issuing CREATE/WRITE requests that force an oplock/lease break. No local access is needed.
AC:LAttack complexity, low
The attacker controls both sides of the sequence: they create the oplock/lease, they establish and tear down the channel that frees the ksmbd_conn, and they choose when to trigger the break that dereferences the stale pointer, so it is repeatable at will and can be retried indefinitely across connections. Heap grooming to reclaim the freed conn is done with attacker-sent SMB buffers, and the config-independent r_count/RELEASING TOCTOU offers an additional path.
PR:LPrivileges required, low
An authenticated SMB session is required — oplocks/leases are only created after session setup and tree connect, and multichannel binding is explicitly refused for guest users (user_guest() → -EOPNOTSUPP), so valid credentials are needed. No administrative or share-admin privileges are required beyond ordinary file access on an exported share.
UI:NUser interaction, none
The attacker performs every step from its own SMB connections — open with a batch oplock/lease, bind a channel, disconnect it, then re-open or write the file to force the break. No action by an administrator or another user is required.
S:UScope, unchanged
The use-after-free corrupts kernel heap memory belonging to the ksmbd server and is exploited within the kernel's own security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
The freed struct ksmbd_conn is read back in multiple paths (compare_guid_key reads conn->ClientGUID, ksmbd_conn_write follows conn->transport->ops), so reclaiming the slab object with attacker-shaped data turns these into a kernel-memory read/disclosure primitive, and break notifications built from the stale conn can leak kernel data to the wire.
I:HIntegrity impact, high
The same dangling pointer is written through — atomic_inc/dec on conn->r_count, mutex_lock(&conn->srv_mutex), and wake_up(&conn->r_count_q) traversing a freed waitqueue — and conn->transport->ops->writev is called indirectly, giving controlled-write and control-flow-hijack potential for full kernel compromise.
A:HAvailability impact, high
Dereferencing and writing to the freed ksmbd_conn reliably corrupts the slab and oopses or panics the kernel (mutex/waitqueue operations on freed memory, indirect call through a stale transport pointer), taking down the whole system.