Re: [BUG] null-ptr-deref on ksmbd-for-next-next branch
ChenXiaoSong <[email protected]> Wed, 22 Jul 2026 10:14:59 +0800
| Newsgroups | org.kernel.vger.linux-cifs |
|---|---|
| Message-ID | <[email protected]> |
Yes, you are correct. Checking conn->ops->is_sign_req is OK. I checked work->sess because signed_req is only used by the session-dependent signing checks below. 在 2026/7/22 9:55, Namjae Jeon 写道: >> - signed_req = conn->ops->is_sign_req(work, command); >> + signed_req = work->sess && >> + conn->ops->is_sign_req(work, command); > I don't understand why work->sess needs to be checked here. IIUC, the > crash occurs because conn->ops->is_sign_req is NULL when Windows > client sends an initial SMB1 negotiate request. If so, wouldn't > checking the callback directly make the intent clearer? > + signed_req = conn->ops->is_sign_req && > conn->ops->is_sign_req(work, command); -- ChenXiaoSong <[email protected]> Chinese Homepage: https://chenxiaosong.com English Homepage: https://chenxiaosong.com/en