In order to let the server check the SMB signing on SMB2 Cancel PDUs when AES-128-GMAC was negotiated, it's required that the client always includes the MID value, even if the AsyncID is also included. But it turns out that some vendors (which don't support AES-128-GMAC yet) require the MID of an SMB2 Cancel to be 0 is the AsyncID is also provided. In order to maintain support for such servers, we should send the MID only if AES-128-GMAC (or any future algorithm) is used.
This bug was referenced in samba master: dd07bb81bb9a570b321bb2e5adab42546736ff9f
Created attachment 16856 [details] Patch for v4-15-test
Re-assigning to Jule for inclusion in 4.15.next.
*** Bug 14858 has been marked as a duplicate of this bug. ***
This bug was referenced in samba v4-15-test: cb768d624eb4e9e4bbaec5e1408d59267c5bb475
Closing out bug report. Thanks!
This bug was referenced in samba v4-15-stable (Release samba-4.15.1): cb768d624eb4e9e4bbaec5e1408d59267c5bb475