mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 11:17:07 +00:00
Two SMB3 server fixes
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmUXOMIACgkQiiy9cAdy T1G+XQv9Fj1kWJRPHih1wTRFHAgysHRtFw04KvW9SLmpGkPLBslJm3Fg1yPiXytc nfqZNCPS/tuWIdqc9YRJqEWKfCO6X/+0IESnN6Wl4jIqMSviL/Hg3DzXZr5YCsAy 1vJ+DYmQkmWNgZ8grnFjKCSezTrAb+b+VLZqsx7dzT8NhTRxdKoTBDS31jTGMswV OIQ1b/aLv9hgUS08wqzSKveMq8DkX66UbkSakM+tVImu32eh7u1HG89P7y3e/dr3 lGwd/Pq+IIiyAgZ0uoPdI9hQ2+Md6JfhVFMiMTLUfwh1LCDgrYnYrOkuZWYvDr9z t2Y0+IwEkljk7HcFaL0NKPJW2beG4eNh/t2t6ff6vK8MhzlXp3KM5yVBlXNYc7hA JfsMxVIFhUobeRKbQY9S6BstHyo19pdfeHDm/+RicIhRfOo++7kWYzwqKsD0pvLC wcr3CBLqqsPXamRwUBbxnMASjYVmoz4nSXusXLDxmSWK39NCjEIz3YeFZfcAdoou jnvMikMA =jim3 -----END PGP SIGNATURE----- Merge tag '6.6-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Two SMB3 server fixes for null pointer dereferences: - invalid SMB3 request case (fixes issue found in testing the read compound patch) - iovec error case in response processing" * tag '6.6-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: check iov vector index in ksmbd_conn_write() ksmbd: return invalid parameter error response if smb2 request is invalid
This commit is contained in:
commit
9f3ebbef74
@ -197,6 +197,9 @@ int ksmbd_conn_write(struct ksmbd_work *work)
|
||||
if (work->send_no_response)
|
||||
return 0;
|
||||
|
||||
if (!work->iov_idx)
|
||||
return -EINVAL;
|
||||
|
||||
ksmbd_conn_lock(conn);
|
||||
sent = conn->transport->ops->writev(conn->transport, work->iov,
|
||||
work->iov_cnt,
|
||||
|
@ -115,8 +115,10 @@ static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn,
|
||||
if (check_conn_state(work))
|
||||
return SERVER_HANDLER_CONTINUE;
|
||||
|
||||
if (ksmbd_verify_smb_message(work))
|
||||
if (ksmbd_verify_smb_message(work)) {
|
||||
conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER);
|
||||
return SERVER_HANDLER_ABORT;
|
||||
}
|
||||
|
||||
command = conn->ops->get_cmd_val(work);
|
||||
*cmd = command;
|
||||
|
@ -440,10 +440,8 @@ int ksmbd_smb2_check_message(struct ksmbd_work *work)
|
||||
|
||||
validate_credit:
|
||||
if ((work->conn->vals->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU) &&
|
||||
smb2_validate_credit_charge(work->conn, hdr)) {
|
||||
work->conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER);
|
||||
smb2_validate_credit_charge(work->conn, hdr))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user