The Samba-Bugzilla – Attachment 13017 Details for
Bug 12610
smbd can crash on bad negprot.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.5.next, 4.4.next.
bug-12610-v45 (text/plain), 1.95 KB, created by
Jeremy Allison
on 2017-03-03 18:07:53 UTC
(
hide
)
Description:
git-am fix for 4.5.next, 4.4.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2017-03-03 18:07:53 UTC
Size:
1.95 KB
patch
obsolete
>From 3f24f628a1e48d4aacc43906f25dd7fa793f9eef Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 28 Feb 2017 15:03:45 +0000 >Subject: [PATCH] smbd: Do an early exit on negprot failure >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12610 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Ralph Böhme <slow@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit cf9acf9a3da932fca115967eb3d9d9ed48fcbbfc) >--- > source3/smbd/negprot.c | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > >diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c >index 793306ad0e0..176dbd79943 100644 >--- a/source3/smbd/negprot.c >+++ b/source3/smbd/negprot.c >@@ -723,17 +723,26 @@ void reply_negprot(struct smb_request *req) > break; > } > >- if(choice != -1) { >- fstrcpy(remote_proto,supported_protocols[protocol].short_name); >- reload_services(sconn, conn_snum_used, true); >- supported_protocols[protocol].proto_reply_fn(req, choice); >- DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name)); >- } else { >- DEBUG(0,("No protocol supported !\n")); >+ if (choice == -1) { >+ bool ok; >+ >+ DBG_NOTICE("No protocol supported !\n"); > reply_outbuf(req, 1, 0); > SSVAL(req->outbuf, smb_vwv0, choice); >+ >+ ok = srv_send_smb(xconn, (char *)req->outbuf, >+ false, 0, false, NULL); >+ if (!ok) { >+ DBG_NOTICE("srv_send_smb failed\n"); >+ } >+ exit_server_cleanly("no protocol supported\n"); > } > >+ fstrcpy(remote_proto,supported_protocols[protocol].short_name); >+ reload_services(sconn, conn_snum_used, true); >+ supported_protocols[protocol].proto_reply_fn(req, choice); >+ DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name)); >+ > DEBUG( 5, ( "negprot index=%d\n", choice ) ); > > /* We always have xconn->smb1.signing_state also for >= SMB2_02 */ >-- >2.12.0.rc1.440.g5b76565f74-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 12610
:
13016
| 13017