diff options
author | Volker Lendecke <vl@samba.org> | 2008-09-12 21:19:37 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-09-12 21:42:34 +0200 |
commit | f8f1679bc46a99462daf4336be5155db37482361 (patch) | |
tree | 0e12d6f19ffb24a6ed486b0647f8438caaf5f9f1 | |
parent | fd7635a1161e25d88a8252a5cf9de70ca2fe4232 (diff) | |
download | samba-f8f1679bc46a99462daf4336be5155db37482361.tar.gz samba-f8f1679bc46a99462daf4336be5155db37482361.tar.bz2 samba-f8f1679bc46a99462daf4336be5155db37482361.zip |
Add a paranoia check on incoming PDUs
(This used to be commit 8b81b85200b7ca18cf81fdbbc3254d8578b35f43)
-rw-r--r-- | source3/libsmb/async_smb.c | 7 |
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 */ |