smb: client: delete compound mids on send failure before unlock
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 8f6f8a48399f82f4a83f7b9f25b9707e0062a4f9, Kernel 4.21, Kernel 36a2ba21d38a86bae84441e4c8d5b10653ef341a and 5 more.
In the Linux kernel, the following vulnerability has been resolved: smb: client: delete compound mids on send failure before unlock When sending a compound request fails, smb_send_rqst() kicks off a reconnect. compound_send_recv() still has those mids on pending_mid_q, but it unlocks the server without removing them first. During reconnect, cifs_abort_connection() walks pending_mid_q and runs each mid callback. With no response yet, those callbacks return credits and drop in_flight. Then compound_send_recv()'s send-error path returns the same credits again. in_flight ends up decremented twice and smb2_add_credits() WARNs. syzbot hits this during SMB2_negotiate when the socket send fails. cifs_call_async() already calls delete_mid() before unlock on send failure. Do the same for compound chains and set cancelled_mid[] so the out: path does not delete them again.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=ee258d79159afed52ca9372aeb9c1a51e89b32ee <8f6f8a48399f82f4a83f7b9f25b9707e0062a4f9, >=4.20.11 <4.21, >=ee258d79159afed52ca9372aeb9c1a51e89b32ee <36a2ba21d38a86bae84441e4c8d5b10653ef341a, >=ee258d79159afed52ca9372aeb9c1a51e89b32ee <59d30bdc3dd6fd3a8990f59bc7a137b1cbb3ed4e, >=ee258d79159afed52ca9372aeb9c1a51e89b32ee <70783946f3b5d0c06ec7df0f5e7bec2bfad24efb, =3c57a0be487088b08d9c88998f911eb4a7ba36e4, =5.0 | 8f6f8a48399f82f4a83f7b9f25b9707e0062a4f9, 4.21, 36a2ba21d38a86bae84441e4c8d5b10653ef341a, 59d30bdc3dd6fd3a8990f59bc7a137b1cbb3ed4e, 70783946f3b5d0c06ec7df0f5e7bec2bfad24efb |
| linux-kernel: Kernel | >=5.0.0 <6.12.117, >=6.13.0 <6.18.61, >=6.19.0 <7.2.9, >=4.20.11 <4.21 | 6.12.117, 6.18.61, 7.2.9, 4.21 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket