Lucene search

K
cvelistLinuxCVELIST:CVE-2023-52480
HistoryFeb 29, 2024 - 5:43 a.m.

CVE-2023-52480 ksmbd: fix race condition between session lookup and expire

2024-02-2905:43:12
Linux
www.cve.org
2
linux kernel
vulnerability
ksmbd
race condition
session lookup
expire
rwsem

9.4 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%

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.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/smb/server/connection.c",
      "fs/smb/server/connection.h",
      "fs/smb/server/mgmt/user_session.c"
    ],
    "versions": [
      {
        "version": "1da177e4c3f4",
        "lessThan": "c77fd3e25a51",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "a2ca5fd3dbcc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "18ced78b0ebc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "53ff5cf89142",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/smb/server/connection.c",
      "fs/smb/server/connection.h",
      "fs/smb/server/mgmt/user_session.c"
    ],
    "versions": [
      {
        "version": "5.15.145",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.57",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.5.7",
        "lessThanOrEqual": "6.5.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

9.4 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%