CVE-2024-53186: ksmbd: fix use-after-free in SMB request handling

Published Dec 27, 2024
·
Updated

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 ksmbdconnhandlerloop() and the freeing of ksmbdconn in the workqueue handler handleksmbdwork(). This leads to a UAF. - KASAN: slab-use-after-free Read in handleksmbdwork - KASAN: slab-use-after-free in rtlockslowlocklocked

This race condition arises as follows: - ksmbdconnhandlerloop() waits for conn->rcount to reach zero: waitevent(conn->rcountq, atomicread(&conn->rcount) == 0); - Meanwhile, handleksmbdwork() decrements conn->rcount using atomicdecreturn(&conn->rcount), and if it reaches zero, calls ksmbdconnfree(), which frees conn. - However, after handleksmbdwork() decrements conn->rcount, it may still access conn->rcountq in the following line: waitqueueactive(&conn->rcountq) or wakeup(&conn->rcountq) 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 Software

4 affected components
Linux Linux kernel>=6.6.55<6.6.64
Linux Linux kernel>=6.10.14<6.11
Linux Linux kernel>=6.11.3<6.11.11
Linux Linux kernel>=6.12<6.12.2

Event History

Dec 27, 2024
CVE Published
via MITRE·01:49 PM
Data Sourced
via MITRE·01:49 PM
DescriptionSeverity
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 29, 2025
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2024-53186?

The severity of CVE-2024-53186 has not been explicitly assigned, but it is crucial to address due to its potential impact on system stability.

2

How do I fix CVE-2024-53186?

To fix CVE-2024-53186, update the Linux kernel to a version later than 6.6.64, 6.10.14, 6.11.3, or 6.12.

3

Which versions of the Linux kernel are affected by CVE-2024-53186?

CVE-2024-53186 affects Linux kernel versions from 6.6.55 to 6.6.64, 6.10.14 to 6.11, 6.11.3 to 6.11.11, and 6.12 to 6.12.2.

4

What type of vulnerability is CVE-2024-53186?

CVE-2024-53186 is identified as a use-after-free vulnerability caused by a race condition in SMB request handling.

5

What components are affected by CVE-2024-53186?

CVE-2024-53186 specifically affects the ksmbd component of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203