# CVE-2024-50086: ksmbd: fix user-after-free from session log off

- 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.48%, higher than 42% of CVEs (2026-12-01)
- Published: 2024-10-29T00:50:29.284Z
- Modified: 2026-08-05T11:41:31.690Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix user-after-free from session log off

There is racy issue between smb2 session log off and smb2 session setup.
It will cause user-after-free from session log off.
This add session_lock when setting SMB2_SESSION_EXPIRED and referece
count to session struct not to free session while it is being used.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 0f62358ce85b2d4c949ef1b648be01b29cec667a; from 0626e6641f6b467447c81dd7678a69c66f7746cf before a9839c37fd813b432988f58a9d9dd59253d3eb2c; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 5511999e9615e4318e9142d23b29bd1597befc08; from 0626e6641f6b467447c81dd7678a69c66f7746cf before ee371898b53a9b9b51c02d22a8c31bfb86d45f0d; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930; 5.15 (not affected: before 5.15; from 5.15.171 up to 5.15.*; from 6.1.114 up to 6.1.*; from 6.6.58 up to 6.6.*; from 6.11.5 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: before 6.1.114; from 6.2 before 6.6.58; from 6.7 before 6.11.5; 6.12

## 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`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/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/0f62358ce85b2d4c949ef1b648be01b29cec667a>
- <https://git.kernel.org/stable/c/a9839c37fd813b432988f58a9d9dd59253d3eb2c> (patch)
- <https://git.kernel.org/stable/c/5511999e9615e4318e9142d23b29bd1597befc08> (patch)
- <https://git.kernel.org/stable/c/ee371898b53a9b9b51c02d22a8c31bfb86d45f0d> (patch)
- <https://git.kernel.org/stable/c/7aa8804c0b67b3cb263a472d17f2cb50d7f1a930> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

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

---

Page: https://cve.day/CVE-2024-50086 · Whole record: https://cve.day/CVE-2024-50086.json · Rebuilt by cve.day 2026-11-25T22:58:47.450Z
