Linux: smb: client: close completed creates on compound wait errors
What fixes it
- 8afc80156b1d9e2cfd02d42c255305fad95b59fcLinuxCVE List
- 2cb07d1a6a30283dbfc809c8036bc1fd103d59faLinuxCVE List
- 224b56b7c02b2bfb1f5bee18d5f56ae6b052be44LinuxCVE List
- 253612499ce9b4cd7bb922fe507ec204bddd9313LinuxCVE List
- 6c5c547f037bc18f0b8d0b5db5a648f8f630ce85LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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.
Text from CVE List
Affected versions 12
- Linuxaffected: e0bba0b8548179b696e86c158ea8f45f2ef6ad14 before 8afc80156b1d9e2cfd02d42c255305fad95b59fcCVE List
- Linuxaffected: e0bba0b8548179b696e86c158ea8f45f2ef6ad14 before 2cb07d1a6a30283dbfc809c8036bc1fd103d59faCVE List
- Linuxaffected: e0bba0b8548179b696e86c158ea8f45f2ef6ad14 before 224b56b7c02b2bfb1f5bee18d5f56ae6b052be44CVE List
- Linuxaffected: e0bba0b8548179b696e86c158ea8f45f2ef6ad14 before 253612499ce9b4cd7bb922fe507ec204bddd9313CVE List
- Linuxaffected: e0bba0b8548179b696e86c158ea8f45f2ef6ad14 before 6c5c547f037bc18f0b8d0b5db5a648f8f630ce85CVE List
- Linuxaffected: 4.19CVE List
- Linuxunaffected: all versions before 4.19CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.113 through 6.12.*CVE List
- Linuxunaffected: 6.18.56 through 6.18.*CVE List
- Linuxunaffected: 7.2.9 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/8afc80156b1d9e2cfd02d42c255305fad95b59fcReferencevia CVE List
- git.kernel.org/stable/c/2cb07d1a6a30283dbfc809c8036bc1fd103d59faReferencevia CVE List
- git.kernel.org/stable/c/224b56b7c02b2bfb1f5bee18d5f56ae6b052be44Referencevia CVE List
- git.kernel.org/stable/c/253612499ce9b4cd7bb922fe507ec204bddd9313Referencevia CVE List
- git.kernel.org/stable/c/6c5c547f037bc18f0b8d0b5db5a648f8f630ce85Referencevia CVE List