smb: client: close completed creates on compound wait errors
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e0bba0b8548179b696e86c158ea8f45f2ef6ad14 · < 224b56b7c02b2bfb1f5bee18d5f56ae6b052be44| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: close completed creates on compound wait errors
compound_send_recv() waits for responses in order. If a later wait is interrupted, or if a later MID fails during response synchronization, an earlier CREATE may already have opened a remote handle. The earlier mid is then released without invoking handle_cancelled_mid(), leaving the remote handle open because no FID was copied to the caller.
Mark completed earlier mids as cancelled when a compound wait or MID synchronization aborts. Keep their response buffers attached while the MIDs are synchronized, and transfer them only after synchronization of the processed responses, so the release path can inspect successful CREATE responses and queue SMB2_close() after a later failure. Account for a remote open only after the close work is allocated and before it is queued, since the caller has not yet updated num_remote_opens. Mark the create+close compound used by smb2_unlink() so it is not closed again. Non-CREATE responses and compounds that already include a close keep their existing behavior.
From the CVE record · Linux
The Linux kernel SMB client can leave a remote handle open when an earlier CREATE succeeds but a later compound-response wait is interrupted or response synchronization fails. The input does not describe an attacker action, authentication requirement, or user interaction needed to trigger the issue.
Teams running the Linux kernel SMB client should check their kernels; affected versions are not specified.