{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-53186",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2024-53186"
  ],
  "published": "2024-12-27T13:53:01Z",
  "summary": "ksmbd: fix use-after-free in SMB request handling",
  "details": "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.",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.6.62-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-2712",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-v6",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-v7",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-v7l",
            "binary_version": "1:6.6.62-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.62+rpt-rpi-v8",
            "binary_version": "1:6.6.62-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.62-1+rpt1": {
            "linux_commit": "dd2394360860d15146c96635796a75b05bb32b61",
            "upstream_version": "6.6.62",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.64"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-53186"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a96f9eb7add30ba0fafcfe7b7aca090978196800"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f20b77f7897e6aab9ce5527e6016ad2be5d70a33"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/96261adb998a3b513468b6ce17dbec76be5507d4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9a8c5d89d327ff58e9b2517f8a6afb4181d32c6e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z"
  }
}
