# CVE-2023-52442: ksmbd: validate session id and tree id in compound request

- Severity: Critical 9.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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): 29.6%, higher than 98% of CVEs (2026-12-01)
- Published: 2024-02-21T07:21:01.814Z
- Modified: 2026-08-05T09:09:59.894Z
- 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: validate session id and tree id in compound request

`smb2_get_msg()` in smb2_get_ksmbd_tcon() and smb2_check_user_session()
will always return the first request smb2 header in a compound request.
if `SMB2_TREE_CONNECT_HE` is the first command in compound request, will
return 0, i.e. The tree id check is skipped.
This patch use ksmbd_req_buf_next() to get current command in compound.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 017d85c94f02090a87f4a473dbe0d6ee0da72693; from 0626e6641f6b467447c81dd7678a69c66f7746cf before becb5191d1d5fdfca0198a2e37457bbbf4fe266f; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 4c2b350b2e269e3fd17bbfa42de1b42775b777ac; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 3df0411e132ee74a87aa13142dfd2b190275332e; 5.15 (not affected: before 5.15; from 5.15.145 up to 5.15.*; from 6.1.53 up to 6.1.*; from 6.4.16 up to 6.4.*; from 6.5 up to *)
- linux linux_kernel: from 5.15 before 5.15.145; from 5.16 before 6.1.53; from 6.2 before 6.4.16; 6.5

## Every score

- Linux: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/017d85c94f02090a87f4a473dbe0d6ee0da72693> (patch)
- <https://git.kernel.org/stable/c/becb5191d1d5fdfca0198a2e37457bbbf4fe266f> (patch)
- <https://git.kernel.org/stable/c/4c2b350b2e269e3fd17bbfa42de1b42775b777ac> (patch)
- <https://git.kernel.org/stable/c/3df0411e132ee74a87aa13142dfd2b190275332e> (patch)

## Sources

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

---

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