mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Fix bug #9214 - Bad user supplied SMB2 credit value can cause smbd to call smb_panic.
Terminate the connection cleanly instead.
This commit is contained in:
parent
3983515a0d
commit
c2f5b2466b
@ -780,7 +780,12 @@ static void smb2_set_operation_credit(struct smbd_server_connection *sconn,
|
||||
out_status = NT_STATUS(IVAL(outhdr, SMB2_HDR_STATUS));
|
||||
|
||||
SMB_ASSERT(sconn->smb2.max_credits >= sconn->smb2.credits_granted);
|
||||
SMB_ASSERT(sconn->smb2.max_credits >= credit_charge);
|
||||
|
||||
if (sconn->smb2.max_credits < credit_charge) {
|
||||
smbd_server_connection_terminate(sconn,
|
||||
"client error: credit charge > max credits\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (out_flags & SMB2_HDR_FLAG_ASYNC) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user