diff options
author | Jeremy Allison <jra@samba.org> | 2019-11-26 12:17:29 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-12-13 10:36:15 +0000 |
commit | cff1d4c3421cbf56e128e5a57a9cc495a51a1f1f (patch) | |
tree | 41f538d383fc5e7e0a5812935a27257c0a5ecf4b /source3 | |
parent | 0521333d47737c8e2af0883590fa5384dcd045c9 (diff) | |
download | samba-cff1d4c3421cbf56e128e5a57a9cc495a51a1f1f.tar.gz |
s3: smbd: Ensure we exit on smbd_smb2_process_negprot() fail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14205
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit a2d81d77c111379cbb6bd732c717307974eace0a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/process.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 177cb3cc505..7c45a648b77 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1969,7 +1969,14 @@ static void process_smb(struct smbXsrv_connection *xconn, if (smbd_is_smb2_header(inbuf, nread)) { const uint8_t *inpdu = inbuf + NBT_HDR_SIZE; size_t pdulen = nread - NBT_HDR_SIZE; - smbd_smb2_process_negprot(xconn, 0, inpdu, pdulen); + NTSTATUS status = smbd_smb2_process_negprot( + xconn, + 0, + inpdu, + pdulen); + if (!NT_STATUS_IS_OK(status)) { + exit_server_cleanly("SMB2 negprot fail"); + } return; } if (nread >= smb_size && valid_smb_header(inbuf) |