Skip to content

In the Linux kernel, the following vulnerability has been...

High severity Unreviewed Published Dec 27, 2024 to the GitHub Advisory Database • Updated Feb 10, 2025

Package

No package listedSuggest a package

Affected versions

Unknown

Patched versions

Unknown

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.

References

Published by the National Vulnerability Database Dec 27, 2024
Published to the GitHub Advisory Database Dec 27, 2024
Last updated Feb 10, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(5th percentile)

CVE ID

CVE-2024-53186

GHSA ID

GHSA-w9v5-63v9-9qvj

Source code

No known source code

Dependabot alerts are not supported on this advisory because it does not have a package from a supported ecosystem with an affected and fixed version.

Learn more about GitHub language support

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.