Skip to content
Heist/ feed
Back to feed
CriticalFix available

ksmbd: fix race condition between session lookup and expire

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix race condition between session lookup and expire Thread A + Thread B ksmbd_session_lookup | smb2_sess_setup sess = xa_load | | | xa_erase(&conn->sessions, sess->id); | | ksmbd_session_destroy(sess) --> kfree(sess) | // UAF! | sess->last_active = jiffies | + This patch add rwsem to fix race condition between ksmbd_session_lookup and ksmbd_expire_session.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.57, 6.5.7
CVEs
CVE-2023-52480
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 00:58 UTC · Revision 1

Source evidence

ksmbd: fix race condition between session lookup and expire

core-osv · Original source

Published 29 Feb 2024, 05:43 UTC

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix race condition between session lookup and expire Thread A + Thread B ksmbd_session_lookup | smb2_sess_setup sess = xa_load | | | xa_erase(&conn->sessions, sess->id); | | ksmbd_session_destroy(sess) --> kfree(sess) | // UAF! | sess->last_active = jiffies | + This patch add rwsem to fix race condition between ksmbd_session_lookup and ksmbd_expire_session.

osv:CVE-2023-52480

Kernel

Fixed versions: 6.1.57, 6.5.7

Complete source record
{
  "id": "6481006804846849ec3c32ac4c3f02f285595b196c4d2c39cfd090867c2cd953",
  "url": "https://osv.dev/vulnerability/CVE-2023-52480",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ksmbd: fix race condition between session lookup and expire",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix race condition between session lookup and expire Thread A + Thread B ksmbd_session_lookup | smb2_sess_setup sess = xa_load | | | xa_erase(&conn->sessions, sess->id); | | ksmbd_session_destroy(sess) --> kfree(sess) | // UAF! | sess->last_active = jiffies | + This patch add rwsem to fix race condition between ksmbd_session_lookup and ksmbd_expire_session.",
    "evidence": "osv:CVE-2023-52480",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.57",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.5.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "CVE-2023-52480",
      "aliases": [
        "CVE-2023-52480"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a6a9601ba995d0fec635324cb9fd8d14f9bea14e"
                },
                {
                  "fixed": "c77fd3e25a51ac92b0f1b347a96eff6a0b4f066f"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1fc8a2b14ef5223f8e0b95faba2ee0a6e4d0f99d"
                },
                {
                  "fixed": "a2ca5fd3dbcc665e1169044fa0c9e3eba779202b"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ea174a91893956450510945a0c5d1a10b5323656"
                },
                {
                  "fixed": "18ced78b0ebccc2d16f426143dc56ab3aad666be"
                },
                {
                  "fixed": "53ff5cf89142b978b1a5ca8dc4d4425e6a09745f"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.1.29"
                },
                {
                  "fixed": "6.1.57"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.2.16"
                },
                {
                  "fixed": "6.3"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.3.2"
                },
                {
                  "fixed": "6.4"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "750a2d772e9d9ff377fd32e3b6797bf2cd847a7a"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6775ee7ef4b37c521aa4cf3730f54554c4875542"
                }
              ]
            }
          ],
          "versions": [
            "v6.1.56",
            "v6.1.55",
            "v6.1.54",
            "v6.1.53",
            "v6.1.52",
            "v6.1.51",
            "v6.1.50",
            "v6.1.49",
            "v6.1.48",
            "v6.1.47",
            "v6.1.46",
            "v6.1.45",
            "v6.1.44",
            "v6.1.43",
            "v6.1.42",
            "v6.1.41",
            "v6.1.40",
            "v6.1.39",
            "v6.1.38",
            "v6.1.37",
            "v6.1.36",
            "v6.1.35",
            "v6.1.34",
            "v6.1.33",
            "v6.1.32",
            "v6.1.31",
            "v6.1.30",
            "v6.1.29",
            "v6.2.16",
            "v6.3.13",
            "v6.3.12",
            "v6.3.11",
            "v6.3.10",
            "v6.3.9",
            "v6.3.8",
            "v6.3.7",
            "v6.3.6",
            "v6.3.5",
            "v6.3.4",
            "v6.3.3",
            "v6.3.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52480.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.1.57"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.5.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52480.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.571214524Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/18ced78b0ebccc2d16f426143dc56ab3aad666be",
        "https://git.kernel.org/stable/c/53ff5cf89142b978b1a5ca8dc4d4425e6a09745f",
        "https://git.kernel.org/stable/c/a2ca5fd3dbcc665e1169044fa0c9e3eba779202b",
        "https://git.kernel.org/stable/c/c77fd3e25a51ac92b0f1b347a96eff6a0b4f066f",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52480.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-52480",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52480.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-52480",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516800,
  "published_at": "2024-02-29T05:43:12.019+00:00"
}