Re: [PATCH v2] ksmbd: build a response when the connection state stops a request

From: Ian Bridges

Date: Wed Dec 02 2026 - 18:25:51 EST


I tested this on ksmbd-for-next 030c481c019b on x86_64 with KASAN,
with the same probes as for v1. A signed compound of a blocked LOCK and
a NEGOTIATE was stopped by a SESSION_SETUP with the PreviousSessionId
of its session. Without the patch the warning appeared and the LOCK
response carried a wrong status and a signature that did not verify.
With the patch no warning appeared. The LOCK response was signed and
verified, and an unsigned STATUS_CONNECTION_DISCONNECTED response
followed it. The same held when the stopped NEGOTIATE had a forged
signature, and when it had a CreditCharge of 65535. With the second
NEGOTIATE trigger no warning appeared either. smbtorture gives the same
results as on the base, and KASAN reported nothing.

Reviewed-by: Ian Bridges <icb@xxxxxxxxxxxx>
Tested-by: Ian Bridges <icb@xxxxxxxxxxxx>