{"id":"CVE-2026-99539","aliases":["CVE-2026-99539"],"related":[],"kind":"vulnerability","state":"published","title":"ksmbd: fix session reference leak on compounded SESSION_SETUP","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix session reference leak on compounded SESSION_SETUP\n\nA compound request can place SESSION_SETUP after another command. That\nearlier command leaves a reference to its session in work->sess.\nsmb2_sess_setup() then overwrites work->sess with the session it looks up\nor creates, and the dispatcher later puts work->sess only once. The\ninherited reference is never dropped. That leaks the session, together\nwith its setup connection and socket, and every repeat of the compound\nleaks another.\n\n  unreferenced object (size 512):\n    __kmalloc_cache_noprof+0x32c/0x3a0\n    ksmbd_smb2_session_create+0xf6/0x9c0 [ksmbd]\n    smb2_sess_setup+0xda4/0x6280 [ksmbd]\n    handle_ksmbd_work+0x88c/0x1cb0 [ksmbd]\n\nSave the inherited session on entry. After the request has been\nprocessed, release it once, but only when smb2_sess_setup() has replaced\nwork->sess with its own session or cleared it. Do this after\nksmbd_conn_unlock() so the put does not run under srv_mutex. An error path\nmay instead leave the inherited session in work->sess. Keep it there, so\nthe dispatcher still puts it and the error response is still signed or\nencrypted with it as before.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix session reference leak on compounded SESSION_SETUP\n\nA compound request can place SESSION_SETUP after another command. That\nearlier command leaves a reference to its session in work->sess.\nsmb2_sess_setup() then overwrites work->sess with the session it looks up\nor creates, and the dispatcher later puts work->sess only once. The\ninherited reference is never dropped. That leaks the session, together\nwith its setup connection and socket, and every repeat of the compound\nleaks another.\n\n  unreferenced object (size 512):\n    __kmalloc_cache_noprof+0x32c/0x3a0\n    ksmbd_smb2_session_create+0xf6/0x9c0 [ksmbd]\n    smb2_sess_setup+0xda4/0x6280 [ksmbd]\n    handle_ksmbd_work+0x88c/0x1cb0 [ksmbd]\n\nSave the inherited session on entry. After the request has been\nprocessed, release it once, but only when smb2_sess_setup() has replaced\nwork->sess with its own session or cleared it. Do this after\nksmbd_conn_unlock() so the put does not run under srv_mutex. An error path\nmay instead leave the inherited session in work->sess. Keep it there, so\nthe dispatcher still puts it and the error response is still signed or\nencrypted with it as before.","source":"cvelist"}],"published":"2026-11-19T14:44:54.387Z","modified":"2026-11-23T08:17:55.863Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"0f62358ce85b2d4c949ef1b648be01b29cec667a","fixed":"a259b8f25de7b50d43fb94b29489d98848bba580","status":"affected"},{"type":"git","introduced":"a9839c37fd813b432988f58a9d9dd59253d3eb2c","fixed":"964c39f41c837fc2de221dcb860ff6451e17deae","status":"affected"},{"type":"git","introduced":"5511999e9615e4318e9142d23b29bd1597befc08","fixed":"84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d","status":"affected"},{"type":"git","introduced":"7aa8804c0b67b3cb263a472d17f2cb50d7f1a930","fixed":"b2d710b12e86fd4cf02be090651fa6ea8683fc29","status":"affected"},{"type":"git","introduced":"7aa8804c0b67b3cb263a472d17f2cb50d7f1a930","fixed":"38cddb9f7c9102f23652d198748c658072cf0df5","status":"affected"},{"type":"git","introduced":"7aa8804c0b67b3cb263a472d17f2cb50d7f1a930","fixed":"db30f8f330fc73304edfe595dc5a6f5e17ba97f2","status":"affected"},{"type":"git","introduced":"7aa8804c0b67b3cb263a472d17f2cb50d7f1a930","fixed":"03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65","status":"affected"},{"type":"git","version":"ee371898b53a9b9b51c02d22a8c31bfb86d45f0d","status":"affected"},{"type":"semver","introduced":"5.15.171","fixed":"5.15.226","status":"affected"},{"type":"semver","introduced":"6.1.114","fixed":"6.1.193","status":"affected"},{"type":"semver","introduced":"6.6.58","fixed":"6.6.163","status":"affected"},{"type":"semver","introduced":"6.11.5","fixed":"6.12","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.61","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.2","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/a259b8f25de7b50d43fb94b29489d98848bba580","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/964c39f41c837fc2de221dcb860ff6451e17deae","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/84deaeff31f4bdf5fee5c8dd1e3a4a49c3ffc05d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b2d710b12e86fd4cf02be090651fa6ea8683fc29","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/38cddb9f7c9102f23652d198748c658072cf0df5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/db30f8f330fc73304edfe595dc5a6f5e17ba97f2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99539","url":"https://www.cve.org/CVERecord?id=CVE-2026-99539","licence":"CVE Terms of Use","modified":"2026-11-23T08:04:03.060Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99539","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99539","licence":"Public domain","modified":"2026-11-23T08:17:55.863Z"}],"updatedAt":"2026-11-25T22:59:52.108Z","epss":{"score":0.00206,"percentile":0.11291,"date":"2026-12-01T12:00:22.000Z"}}