CVE-2026-99539
ksmbd: fix session reference leak on compounded SESSION_SETUP
- CVSS
- —
- EPSS
- 0.21% (p11)
- Published
- 2026-11-19
- Age
- 15d old
- Modified
- 2026-11-23
- Product
- Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix session reference leak on compounded SESSION_SETUP A compound request can place SESSION_SETUP after another command. That earlier command leaves a reference to its session in work->sess. smb2_sess_setup() then overwrites work->sess with the session it looks up or creates, and the dispatcher later puts work->sess only once. The inherited reference is never dropped. That leaks the session, together with its setup connection and socket, and every repeat of the compound leaks another. unreferenced object (size 512): __kmalloc_cache_noprof+0x32c/0x3a0 ksmbd_smb2_session_create+0xf6/0x9c0 [ksmbd] smb2_sess_setup+0xda4/0x6280 [ksmbd] handle_ksmbd_work+0x88c/0x1cb0 [ksmbd] Save the inherited session on entry. After the request has been processed, release it once, but only when smb2_sess_setup() has replaced work->sess with its own session or cleared it. Do this after ksmbd_conn_unlock() so the put does not run under srv_mutex. An error path may instead leave the inherited session in work->sess. Keep it there, so the dispatcher still puts it and the error response is still signed or encrypted with it as before.
Fixed in
03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 · 38cddb9f7c9102f23652d198748c658072cf0df5 · 5.15.226 · 5.16 · 6.1.193 · 6.12 · 6.12.117 · 6.18.61 · 6.2 · 6.6.163 · 6.7 · 7.3.2 · 84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d · 964c39f41c837fc2de221dcb860ff6451e17deae · a259b8f25de7b50d43fb94b29489d98848bba580 · b2d710b12e86fd4cf02be090651fa6ea8683fc29 · db30f8f330fc73304edfe595dc5a6f5e17ba97f2
Affected packages
| Ecosystem | Package | Range | Fixed |
|---|---|---|---|
| Linux | Kernel | >=5.15.171, <5.16 | 5.16 |
| Linux | Kernel | >=6.1.114, <6.2 | 6.2 |
| Linux | Kernel | >=6.11.5, <6.12 | 6.12 |
| Linux | Kernel | >=6.12.0, <6.12.117 | 6.12.117 |
| Linux | Kernel | >=6.13.0, <6.18.61 | 6.18.61 |
| Linux | Kernel | >=6.19.0, <7.3.2 | 7.3.2 |
| Linux | Kernel | >=6.6.58, <6.7 | 6.7 |
| vendor | Linux | >=0f62358ce85b2d4c949ef1b648be01b29cec667a, <a259b8f25de7b50d43fb94b29489d98848bba580 | a259b8f25de7b50d43fb94b29489d98848bba580 |
| vendor | Linux | >=5.15.171, <5.15.226 | 5.15.226 |
| vendor | Linux | >=5.15.171, <5.16 | 5.16 |
| vendor | Linux | >=5511999e9615e4318e9142d23b29bd1597befc08, <84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d | 84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d |
| vendor | Linux | >=6.1.114, <6.1.193 | 6.1.193 |
| vendor | Linux | >=6.1.114, <6.2 | 6.2 |
| vendor | Linux | >=6.11.5, <6.12 | 6.12 |
| vendor | Linux | >=6.6.58, <6.6.163 | 6.6.163 |
| vendor | Linux | >=6.6.58, <6.7 | 6.7 |
| vendor | Linux | >=7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, <03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 | 03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 |
| vendor | Linux | >=7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, <38cddb9f7c9102f23652d198748c658072cf0df5 | 38cddb9f7c9102f23652d198748c658072cf0df5 |
| vendor | Linux | >=7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, <b2d710b12e86fd4cf02be090651fa6ea8683fc29 | b2d710b12e86fd4cf02be090651fa6ea8683fc29 |
| vendor | Linux | >=7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, <db30f8f330fc73304edfe595dc5a6f5e17ba97f2 | db30f8f330fc73304edfe595dc5a6f5e17ba97f2 |
| vendor | Linux | >=a9839c37fd813b432988f58a9d9dd59253d3eb2c, <964c39f41c837fc2de221dcb860ff6451e17deae | 964c39f41c837fc2de221dcb860ff6451e17deae |
Sources
- NVD · first seen 15d ago · NVD terms of use
- OSV · first seen 15d ago · CC-BY 4.0
- CVE List · first seen 15d ago · CVE Terms of Use
References
- https://git.kernel.org/stable/c/b2d710b12e86fd4cf02be090651fa6ea8683fc29 other
- https://git.kernel.org/stable/c/38cddb9f7c9102f23652d198748c658072cf0df5 other
- https://git.kernel.org/stable/c/db30f8f330fc73304edfe595dc5a6f5e17ba97f2 other
- https://git.kernel.org/stable/c/03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 other
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git package
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99539.json advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-99539 advisory
- https://git.kernel.org/stable/c/a259b8f25de7b50d43fb94b29489d98848bba580 other
- https://git.kernel.org/stable/c/964c39f41c837fc2de221dcb860ff6451e17deae other
- https://git.kernel.org/stable/c/84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d other