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

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Published: 2024-02-29T05:43:12.019Z
- Modified: 2026-08-15T13:17:43.320Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from a6a9601ba995d0fec635324cb9fd8d14f9bea14e before c77fd3e25a51ac92b0f1b347a96eff6a0b4f066f; from 1fc8a2b14ef5223f8e0b95faba2ee0a6e4d0f99d before a2ca5fd3dbcc665e1169044fa0c9e3eba779202b; from ea174a91893956450510945a0c5d1a10b5323656 before 18ced78b0ebccc2d16f426143dc56ab3aad666be; from ea174a91893956450510945a0c5d1a10b5323656 before 53ff5cf89142b978b1a5ca8dc4d4425e6a09745f; 750a2d772e9d9ff377fd32e3b6797bf2cd847a7a; 6775ee7ef4b37c521aa4cf3730f54554c4875542; from 6.1.29 before 6.1.57; from 6.2.16 before 6.3; from 6.3.2 before 6.4; 6.4 (not affected: before 6.4; from 6.1.57 up to 6.1.*; from 6.5.7 up to 6.5.*; from 6.6 up to *)
- linux linux_kernel: from 5.15 before 5.15.145; from 5.16 before 6.1.57; from 6.2 before 6.5.7; 6.6

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/c77fd3e25a51ac92b0f1b347a96eff6a0b4f066f> (patch)
- <https://git.kernel.org/stable/c/a2ca5fd3dbcc665e1169044fa0c9e3eba779202b> (patch)
- <https://git.kernel.org/stable/c/18ced78b0ebccc2d16f426143dc56ab3aad666be> (patch)
- <https://git.kernel.org/stable/c/53ff5cf89142b978b1a5ca8dc4d4425e6a09745f> (patch)

## Sources

- CVE List: [CVE-2023-52480](https://www.cve.org/CVERecord?id=CVE-2023-52480), CVE Terms of Use, modified 2026-08-15
- NVD: [CVE-2023-52480](https://nvd.nist.gov/vuln/detail/CVE-2023-52480), Public domain, modified 2026-08-15

---

Page: https://cve.day/CVE-2023-52480 · Whole record: https://cve.day/CVE-2023-52480.json · Rebuilt by cve.day 2026-11-25T22:58:33.128Z
