{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2024-53186",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-11-19T17:17:25.012Z",
        "datePublished": "2024-12-27T13:49:29.215Z",
        "dateUpdated": "2026-08-05T11:44:29.475Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:44:29.475Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix use-after-free in SMB request handling\n\nA race condition exists between SMB request handling in\n`ksmbd_conn_handler_loop()` and the freeing of `ksmbd_conn` in the\nworkqueue handler `handle_ksmbd_work()`. This leads to a UAF.\n- KASAN: slab-use-after-free Read in handle_ksmbd_work\n- KASAN: slab-use-after-free in rtlock_slowlock_locked\n\nThis race condition arises as follows:\n- `ksmbd_conn_handler_loop()` waits for `conn->r_count` to reach zero:\n  `wait_event(conn->r_count_q, atomic_read(&conn->r_count) == 0);`\n- Meanwhile, `handle_ksmbd_work()` decrements `conn->r_count` using\n  `atomic_dec_return(&conn->r_count)`, and if it reaches zero, calls\n  `ksmbd_conn_free()`, which frees `conn`.\n- However, after `handle_ksmbd_work()` decrements `conn->r_count`,\n  it may still access `conn->r_count_q` in the following line:\n  `waitqueue_active(&conn->r_count_q)` or `wake_up(&conn->r_count_q)`\n  This results in a UAF, as `conn` has already been freed.\n\nThe discovery of this UAF can be referenced in the following PR for\nsyzkaller's support for SMB requests."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 9.8,
                        "baseSeverity": "CRITICAL"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - ksmbd is the in-kernel SMB server listening on TCP/445; the vulnerable work-completion path is driven entirely by PDUs received from a remote peer and by remote connection teardown. No local access is needed.\nAC:L - The attacker controls both sides of the race — queuing SMB work items (raising conn->r_count) and abruptly closing the TCP connection to drive ksmbd_conn_handler_loop into wait_event/free — and can retry indefinitely across many parallel connections; syzkaller reproduced it without targeting.\nPR:N - queue_ksmbd_work()/handle_ksmbd_work() run for every received PDU including the very first SMB2 NEGOTIATE, before session setup or any credential validation, so an unauthenticated remote attacker reaches the bug.\nUI:N - Exploitation requires only that the attacker open connections and send/close them; no action by any local user or administrator is involved.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed ksmbd_conn is a sprayable general-cache allocation, and the UAF read of conn->r_count_q plus the list walk in wake_up() over reclaimed memory can be leveraged into kernel memory disclosure and, via the resulting control primitive, arbitrary read.\nI:H - wake_up() on the freed waitqueue writes to freed memory (spinlock acquisition and list_del in the wake function) and performs an indirect call through curr->func taken from reclaimed, attacker-sprayable memory, giving a control-flow hijack / arbitrary write primitive.\nA:H - Even without successful exploitation, the use-after-free reliably produces slab corruption, KASAN splats, and kernel oops/panic in handle_ksmbd_work or the RT lock slowpath, and can be triggered repeatedly by an unauthenticated remote peer."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/server/server.c"
                    ],
                    "versions": [
                        {
                            "version": "18f06bacc197d4ac9b518ad1c69999bc3d83e7aa",
                            "lessThan": "a96f9eb7add30ba0fafcfe7b7aca090978196800",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e9dac92f4482a382e8c0fe1bc243da5fc3526b0c",
                            "lessThan": "f20b77f7897e6aab9ce5527e6016ad2be5d70a33",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ee426bfb9d09b29987369b897fe9b6485ac2be27",
                            "lessThan": "96261adb998a3b513468b6ce17dbec76be5507d4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ee426bfb9d09b29987369b897fe9b6485ac2be27",
                            "lessThan": "9a8c5d89d327ff58e9b2517f8a6afb4181d32c6e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9fd3cde4628bcd3549ab95061f2bab74d2ed4f3b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.6.55",
                            "lessThan": "6.6.64",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.11.3",
                            "lessThan": "6.11.11",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.10.14",
                            "lessThan": "6.11",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/server/server.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.64",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.11.11",
                            "lessThanOrEqual": "6.11.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.2",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6.55",
                                    "versionEndExcluding": "6.6.64"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11.3",
                                    "versionEndExcluding": "6.11.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.12.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.13"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.10.14"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/a96f9eb7add30ba0fafcfe7b7aca090978196800"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f20b77f7897e6aab9ce5527e6016ad2be5d70a33"
                },
                {
                    "url": "https://git.kernel.org/stable/c/96261adb998a3b513468b6ce17dbec76be5507d4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9a8c5d89d327ff58e9b2517f8a6afb4181d32c6e"
                }
            ],
            "title": "ksmbd: fix use-after-free in SMB request handling",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-53186",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-02-10T17:13:00.740506Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-416",
                                "description": "CWE-416 Use After Free"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-02-10T17:21:09.067Z"
                }
            }
        ]
    }
}