Descrizione
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.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: EPSS 0.2% (percentile 6).
Versioni da aggiornare
- Linux Linux: vulnerabili le versioni dalla
5.15.171precedenti alla5.16→ aggiornare alla5.16o successiva. - Linux Linux: vulnerabili le versioni dalla
6.1.114precedenti alla6.2→ aggiornare alla6.2o successiva. - Linux Linux: vulnerabili le versioni dalla
6.6.58precedenti alla6.7→ aggiornare alla6.7o successiva. - Linux Linux: vulnerabili le versioni dalla
6.11.5precedenti alla6.12→ aggiornare alla6.12o successiva. - Linux Linux: versione corretta
6.12.117(o successiva). - Linux Linux: versione corretta
6.18.61(o successiva). - Linux Linux: versione corretta
7.3.2(o successiva). - Linux Linux: versione corretta
7.4-rc1(o successiva). - Linux Linux: vulnerabile la versione
6.12→ installare l'ultima release supportata dal vendor.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Linux | Linux | ≥ 5.15.171 < 5.16 | 5.16 |
| Linux | Linux | ≥ 6.1.114 < 6.2 | 6.2 |
| Linux | Linux | ≥ 6.6.58 < 6.7 | 6.7 |
| Linux | Linux | ≥ 6.11.5 < 6.12 | 6.12 |
| Linux | Linux | — | 6.12.117 |
| Linux | Linux | — | 6.18.61 |
| Linux | Linux | — | 7.3.2 |
| Linux | Linux | — | 7.4-rc1 |
| Linux | Linux | 6.12 | — |
Riferimenti
- Riferimentohttps://git.kernel.org/stable/c/03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65
- Riferimentohttps://git.kernel.org/stable/c/38cddb9f7c9102f23652d198748c658072cf0df5
- Riferimentohttps://git.kernel.org/stable/c/b2d710b12e86fd4cf02be090651fa6ea8683fc29
- Riferimentohttps://git.kernel.org/stable/c/db30f8f330fc73304edfe595dc5a6f5e17ba97f2