CVE-2024-53186

ksmbd: fix use-after-free in SMB request handling

HIGH
7
CVSS Score
Published: December 27, 2024 at 01:49 PM UTC
Updated: August 5, 2026 at 12:05 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7
Exploit prediction
EPSS 0.5%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in SMB request handling A race condition exists between SMB request handling in `ksmbd_conn_handler_loop()` and the freeing of `ksmbd_conn` in the workqueue handler `handle_ksmbd_work()`. This leads to a UAF. - KASAN: slab-use-after-free Read in handle_ksmbd_work - KASAN: slab-use-after-free in rtlock_slowlock_locked This race condition arises as follows: - `ksmbd_conn_handler_loop()` waits for `conn->r_count` to reach zero: `wait_event(conn->r_count_q, atomic_read(&conn->r_count) == 0);` - Meanwhile, `handle_ksmbd_work()` decrements `conn->r_count` using `atomic_dec_return(&conn->r_count)`, and if it reaches zero, calls `ksmbd_conn_free()`, which frees `conn`. - However, after `handle_ksmbd_work()` decrements `conn->r_count`, it may still access `conn->r_count_q` in the following line: `waitqueue_active(&conn->r_count_q)` or `wake_up(&conn->r_count_q)` This results in a UAF, as `conn` has already been freed. The discovery of this UAF can be referenced in the following PR for syzkaller's support for SMB requests.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 6.10.146.10.14 ≤ v < 6.116.11.3 ≤ v < 6.11.116.12 ≤ v < 6.12.26.12 ≤ v < 6.136.6.55 ≤ v < 6.6.6418f06bacc197d4ac9b518ad1c69999bc3d83e7aa6.10.146.11.36.126.6.559fd3cde4628bcd3549ab95061f2bab74d2ed4f3be9dac92f4482a382e8c0fe1bc243da5fc3526b0cee426bfb9d09b29987369b897fe9b6485ac2be27
Vendor states this is fixed in 96261adb998a3b513468b6ce17dbec76be5507d4 (fixed)
Vendor states this is fixed in 9a8c5d89d327ff58e9b2517f8a6afb4181d32c6e (fixed)
Vendor states this is fixed in a96f9eb7add30ba0fafcfe7b7aca090978196800 (fixed)
Vendor states this is fixed in f20b77f7897e6aab9ce5527e6016ad2be5d70a33 (fixed)
Affected range stops below 6.11, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 6.11.11 (unaffected)
Vendor states this is fixed in 6.12 (unaffected)
Vendor states this is fixed in 6.12.2 (unaffected)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.6.64 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/96261adb998a3b513468b6ce17dbec76be5507d4
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9a8c5d89d327ff58e9b2517f8a6afb4181d32c6e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a96f9eb7add30ba0fafcfe7b7aca090978196800
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f20b77f7897e6aab9ce5527e6016ad2be5d70a33

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-362CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card