CVE-2026-99539
ksmbd: fix session reference leak on compounded SESSION_SETUP
Check your servers for CVE-2026-99539
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-99539 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.77% of all scored CVEs. Scores of 30 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 0f62358ce85b2d4c949ef1b648be01b29cec667a, before a259b8f25de7b50d43fb94b29489d98848bba580 affected from a9839c37fd813b432988f58a9d9dd59253d3eb2c, before 964c39f41c837fc2de221dcb860ff6451e17deae affected from 5511999e9615e4318e9142d23b29bd1597befc08, before 84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d affected from 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, before b2d710b12e86fd4cf02be090651fa6ea8683fc29 affected from 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, before 38cddb9f7c9102f23652d198748c658072cf0df5 affected from 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, before db30f8f330fc73304edfe595dc5a6f5e17ba97f2 affected from 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930, before 03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 affected ee371898b53a9b9b51c02d22a8c31bfb86d45f0d affected from 5.15.171, before 5.15.226 affected from 6.1.114, before 6.1.193 affected from 6.6.58, before 6.6.163 affected from 6.11.5, before 6.12
Other versions: unaffected
|
| Linux |
affected 6.12 unaffected before 6.12 unaffected from 5.15.226 up to and including 5.15.* unaffected from 6.1.193 up to and including 6.1.* unaffected from 6.6.163 up to and including 6.6.* unaffected from 6.12.117 up to and including 6.12.* unaffected from 6.18.61 up to and including 6.18.* unaffected from 7.3.2 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-99539 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-99539
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-99539
trivy image --scanners vuln IMAGE | grep CVE-2026-99539
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a259b8f25de7b50d43fb94b29489d98848bba580 git.kernel.org
- https://git.kernel.org/stable/c/964c39f41c837fc2de221dcb860ff6451e17deae git.kernel.org
- https://git.kernel.org/stable/c/84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d git.kernel.org
- https://git.kernel.org/stable/c/b2d710b12e86fd4cf02be090651fa6ea8683fc29 git.kernel.org
- https://git.kernel.org/stable/c/38cddb9f7c9102f23652d198748c658072cf0df5 git.kernel.org
- https://git.kernel.org/stable/c/db30f8f330fc73304edfe595dc5a6f5e17ba97f2 git.kernel.org
- https://git.kernel.org/stable/c/03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 git.kernel.org
Source: the record CVE-2026-99539 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse