Re: [PATCH] ksmbd: read request header for compounded CANCEL

From: Noah Weinberger

Date: Sun Nov 08 2026 - 18:54:36 EST


Hi Ian,

Thanks for testing this and catching the overstatement. The failure is narrower than I described: using the response header loses SMB2_FLAGS_ASYNC_COMMAND and selects MessageId lookup, which can still succeed when the CANCEL reuses the pending request's MessageId. Your MessageId 0 case demonstrates the missed cancellation.

I don't have a supporting MS-SMB2 citation for the claim that CANCEL cannot be compounded. Please disregard that statement and the resulting “only non-conforming clients” qualification. Section 3.3.5.16 describes AsyncId lookup for async CANCEL, and Appendix A's note for 3.2.4.24 documents Windows clients setting MessageId to 0 in that case.

Thanks for confirming that reading the request header fixes both forms.

Noah