The Samba-Bugzilla – Attachment 9691 Details for
Bug 10422
max xmit > 64kb leads in segmentation fault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Hacks to reproduce the session setup error
hack.diff (text/plain), 4.77 KB, created by
Stefan Metzmacher
on 2014-02-18 13:38:35 UTC
(
hide
)
Description:
Hacks to reproduce the session setup error
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2014-02-18 13:38:35 UTC
Size:
4.77 KB
patch
obsolete
>From cc4d266512238dd96c5aed5cb4ab45830af8c6cb Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Fri, 6 Dec 2013 13:56:45 +0100 >Subject: [PATCH 1/6] DISCUSS fix LARGE_WRITEX_BUFFER_SIZE > >--- > source3/include/smb.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/include/smb.h b/source3/include/smb.h >index aab4ff5..05b1f8d 100644 >--- a/source3/include/smb.h >+++ b/source3/include/smb.h >@@ -34,7 +34,7 @@ > > #define SAFETY_MARGIN 1024 > #define LARGE_WRITEX_HDR_SIZE 65 >-#define LARGE_WRITEX_BUFFER_SIZE (128*1024) >+#define LARGE_WRITEX_BUFFER_SIZE (0x1FFFF - LARGE_WRITEX_HDR_SIZE) > > #define NMB_PORT 137 > #define DGRAM_PORT 138 >-- >1.7.9.5 > > >From 20614a70273f42788d081f1bf8c115854b617382 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 18 Feb 2014 14:03:21 +0100 >Subject: [PATCH 2/6] Revert "DISCUSS fix LARGE_WRITEX_BUFFER_SIZE" > >This reverts commit 685eea06bfcf67e894be0915673bfebab33449fe. >--- > source3/include/smb.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/include/smb.h b/source3/include/smb.h >index 05b1f8d..aab4ff5 100644 >--- a/source3/include/smb.h >+++ b/source3/include/smb.h >@@ -34,7 +34,7 @@ > > #define SAFETY_MARGIN 1024 > #define LARGE_WRITEX_HDR_SIZE 65 >-#define LARGE_WRITEX_BUFFER_SIZE (0x1FFFF - LARGE_WRITEX_HDR_SIZE) >+#define LARGE_WRITEX_BUFFER_SIZE (128*1024) > > #define NMB_PORT 137 > #define DGRAM_PORT 138 >-- >1.7.9.5 > > >From 4c5e41cceb7972e5015dec2dac601e2b90bc5594 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 18 Feb 2014 12:55:23 +0100 >Subject: [PATCH 3/6] HACK CLI_BUFFER_SIZE => 0 > >--- > source3/libsmb/cliconnect.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c >index 6ca3bab..8104466 100644 >--- a/source3/libsmb/cliconnect.c >+++ b/source3/libsmb/cliconnect.c >@@ -1096,7 +1096,7 @@ static bool cli_sesssetup_blob_next(struct cli_sesssetup_blob_state *state, > SCVAL(state->vwv+0, 0, 0xFF); > SCVAL(state->vwv+0, 1, 0); > SSVAL(state->vwv+1, 0, 0); >- SSVAL(state->vwv+2, 0, CLI_BUFFER_SIZE); >+ SSVAL(state->vwv+2, 0, 0);//CLI_BUFFER_SIZE); > SSVAL(state->vwv+3, 0, 2); > SSVAL(state->vwv+4, 0, 1); > SIVAL(state->vwv+5, 0, 0); >-- >1.7.9.5 > > >From 67628b330eb5a11ecabbc05388c4a44b52da188a Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 18 Feb 2014 13:41:56 +0100 >Subject: [PATCH 4/6] HACK 499 still triggers ERRSRV/ERRerror > >--- > source3/libsmb/cliconnect.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c >index 8104466..7805cf8 100644 >--- a/source3/libsmb/cliconnect.c >+++ b/source3/libsmb/cliconnect.c >@@ -1096,7 +1096,7 @@ static bool cli_sesssetup_blob_next(struct cli_sesssetup_blob_state *state, > SCVAL(state->vwv+0, 0, 0xFF); > SCVAL(state->vwv+0, 1, 0); > SSVAL(state->vwv+1, 0, 0); >- SSVAL(state->vwv+2, 0, 0);//CLI_BUFFER_SIZE); >+ SSVAL(state->vwv+2, 0, 499);//CLI_BUFFER_SIZE); > SSVAL(state->vwv+3, 0, 2); > SSVAL(state->vwv+4, 0, 1); > SIVAL(state->vwv+5, 0, 0); >-- >1.7.9.5 > > >From 7191173c59ba99e60fefe4754b0f68cdd165c954 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 18 Feb 2014 13:41:56 +0100 >Subject: [PATCH 5/6] HACK 500 OK > >--- > source3/libsmb/cliconnect.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c >index 7805cf8..3f0ea9f 100644 >--- a/source3/libsmb/cliconnect.c >+++ b/source3/libsmb/cliconnect.c >@@ -1096,7 +1096,7 @@ static bool cli_sesssetup_blob_next(struct cli_sesssetup_blob_state *state, > SCVAL(state->vwv+0, 0, 0xFF); > SCVAL(state->vwv+0, 1, 0); > SSVAL(state->vwv+1, 0, 0); >- SSVAL(state->vwv+2, 0, 499);//CLI_BUFFER_SIZE); >+ SSVAL(state->vwv+2, 0, 500);//CLI_BUFFER_SIZE); > SSVAL(state->vwv+3, 0, 2); > SSVAL(state->vwv+4, 0, 1); > SIVAL(state->vwv+5, 0, 0); >-- >1.7.9.5 > > >From 8af13a08be5ad5a82e455a75a3d57e144844c2e2 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 18 Feb 2014 13:41:56 +0100 >Subject: [PATCH 6/6] HACK 500 => 498 still works... > >--- > source3/libsmb/cliconnect.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c >index 3f0ea9f..964cdb3 100644 >--- a/source3/libsmb/cliconnect.c >+++ b/source3/libsmb/cliconnect.c >@@ -1096,7 +1096,10 @@ static bool cli_sesssetup_blob_next(struct cli_sesssetup_blob_state *state, > SCVAL(state->vwv+0, 0, 0xFF); > SCVAL(state->vwv+0, 1, 0); > SSVAL(state->vwv+1, 0, 0); >- SSVAL(state->vwv+2, 0, 500);//CLI_BUFFER_SIZE); >+{ >+ static size_t v = 500; >+ SSVAL(state->vwv+2, 0, v--);//CLI_BUFFER_SIZE); >+} > SSVAL(state->vwv+3, 0, 2); > SSVAL(state->vwv+4, 0, 1); > SIVAL(state->vwv+5, 0, 0); >-- >1.7.9.5 >
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
Actions:
View
Attachments on
bug 10422
:
9673
|
9690
| 9691 |
9698
|
9792
|
9793