1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Fix bug #8476 - Samba asserts when SMB2 client breaks the crediting rules.

Just drop the connection, not SMB_ASSERT.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 22 19:41:31 CEST 2011 on sn-devel-104
This commit is contained in:
Jeremy Allison 2011-09-22 09:06:48 -07:00
parent 0921e75001
commit d50fa9c21e

View File

@ -322,8 +322,13 @@ static bool smb2_validate_message_id(struct smbd_server_connection *sconn,
return false;
}
if (sconn->smb2.credits_granted == 0) {
smbd_server_connection_terminate(sconn, "smb2_validate_message_id: "
"terminating connection: client used more credits than granted\n");
return false;
}
/* client just used a credit. */
SMB_ASSERT(sconn->smb2.credits_granted > 0);
sconn->smb2.credits_granted -= 1;
/* Mark the message_id as seen in the bitmap. */