summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-09-12 21:19:37 +0200
committerVolker Lendecke <vl@samba.org>2008-09-12 21:42:34 +0200
commitf8f1679bc46a99462daf4336be5155db37482361 (patch)
tree0e12d6f19ffb24a6ed486b0647f8438caaf5f9f1 /source3
parentfd7635a1161e25d88a8252a5cf9de70ca2fe4232 (diff)
downloadsamba-f8f1679bc46a99462daf4336be5155db37482361.tar.gz
samba-f8f1679bc46a99462daf4336be5155db37482361.tar.bz2
samba-f8f1679bc46a99462daf4336be5155db37482361.zip
Add a paranoia check on incoming PDUs
(This used to be commit 8b81b85200b7ca18cf81fdbbc3254d8578b35f43)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/async_smb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index eedc7d4481..b4d93ff968 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -759,6 +759,13 @@ static void handle_incoming_pdu(struct cli_state *cli)
}
+ if ((IVAL(pdu, 4) != 0x424d53ff) /* 0xFF"SMB" */
+ && (IVAL(pdu, 4) != 0x424d45ff)) /* 0xFF"EMB" */ {
+ DEBUG(10, ("Got non-SMB PDU\n"));
+ status = NT_STATUS_INVALID_NETWORK_RESPONSE;
+ goto invalidate_requests;
+ }
+
/*
* TODO: Handle oplock break requests
*/