Some errors...
Stefan Metzmacher
metze at metzemix.de
Mon Oct 20 07:20:41 GMT 2003
Jeremy Allison schrieb:
> On Tue, Oct 14, 2003 at 10:29:59AM +0200, Stefan Metzmacher wrote:
>
>>Hi *,
>>
>>from time to time I see such errors in my logfile...
>>
>>If someone has time to look at this, tell me what info you want...
>>
>>I can't reproduce them...
>>
>>I use current SAMBA_3_0 cvs and winxp sp1
>>
>>[2003/10/14 07:00:40, 0, pid=6159] libsmb/smb_signing.c:srv_check_incoming_message(752)
>> srv_check_incoming_message: out of seq. seq num 3408 matches.
>>[2003/10/14 07:01:59, 0, pid=6163] lib/util_str.c:safe_strcpy_fn(577)
>> ERROR: NULL dest in safe_strcpy
>>[2003/10/14 07:02:00, 0, pid=6163] lib/util_sock.c:receive_smb(557)
>> receive_smb: SMB Signature verification failed on incoming packet!
>>[2003/10/14 07:02:00, 0, pid=6163] rpc_server/srv_spoolss_nt.c:spoolss_connect_to_client(2603)
>> spoolss_connect_to_client: machine METZE-XP rejected the negotiate protocol. Error was : Server packet had invalid SMB signature!.
>>[2003/10/14 07:44:43, 0, pid=6167] rpc_server/srv_pipe.c:api_pipe_netsec_process(1365)
>> failed to decode PDU
>>[2003/10/14 07:44:43, 0, pid=6167] rpc_server/srv_pipe_hnd.c:process_request_pdu(605)
>> process_request_pdu: failed to do schannel processing.
>>[2003/10/14 10:12:55, 0, pid=6167] libsmb/smb_signing.c:srv_check_incoming_message(752)
>> srv_check_incoming_message: out of seq. seq num 9753 matches.
>>[2003/10/14 10:12:55, 0, pid=6167] lib/util_sock.c:receive_smb(557)
>> receive_smb: SMB Signature verification failed on incoming packet!
here're a patch for the ERROR: NULL dest in safe_strcpy bug
and a patch which adds better debug messages for this error cases.
I later send some more info on the signing stuff
--
metze
-------------------------------------------
Stefan (metze) Metzmacher <metze at metzemix.de>
-------------- next part --------------
Index: printing/nt_printing.c
===================================================================
RCS file: /cvsroot/samba/source/printing/nt_printing.c,v
retrieving revision 1.204.2.43
diff -u -r1.204.2.43 nt_printing.c
--- printing/nt_printing.c 19 Sep 2003 21:57:42 -0000 1.204.2.43
+++ printing/nt_printing.c 20 Oct 2003 07:16:15 -0000
@@ -3306,10 +3306,11 @@
printername));
info.devmode = construct_nt_devicemode(printername);
}
-
- safe_strcpy(adevice, info.printername, sizeof(adevice)-1);
- fstrcpy(info.devmode->devicename, adevice);
+ safe_strcpy(adevice, info.printername, sizeof(adevice)-1);
+ if (info.devmode) {
+ fstrcpy(info.devmode->devicename, adevice);
+ }
len += unpack_values( &info.data, dbuf.dptr+len, dbuf.dsize-len );
-------------- next part --------------
Index: lib/util_str.c
===================================================================
RCS file: /cvsroot/samba/source/lib/util_str.c,v
retrieving revision 1.47.2.44
diff -u -r1.47.2.44 util_str.c
--- lib/util_str.c 13 Sep 2003 22:41:21 -0000 1.47.2.44
+++ lib/util_str.c 20 Oct 2003 07:23:26 -0000
@@ -574,7 +574,7 @@
size_t len;
if (!dest) {
- DEBUG(0,("ERROR: NULL dest in safe_strcpy\n"));
+ DEBUG(0,("ERROR: NULL dest in safe_strcpy, called from [%s][%d]\n",fn,line));
return NULL;
}
@@ -609,7 +609,7 @@
size_t src_len, dest_len;
if (!dest) {
- DEBUG(0,("ERROR: NULL dest in safe_strcat\n"));
+ DEBUG(0,("ERROR: NULL dest in safe_strcat, called from [%s][%d]\n",fn,line));
return NULL;
}
@@ -653,7 +653,7 @@
#endif
if (!dest) {
- DEBUG(0,("ERROR: NULL dest in alpha_strcpy\n"));
+ DEBUG(0,("ERROR: NULL dest in alpha_strcpy, called from [%s][%d]\n",fn,line));
return NULL;
}
@@ -694,9 +694,11 @@
clobber_region(fn, line, dest, n+1);
#endif
- if (!dest)
+ if (!dest) {
+ DEBUG(0,("ERROR: NULL dest in StrnCpy, called from [%s][%d]\n",fn,line));
return(NULL);
-
+ }
+
if (!src) {
*dest = 0;
return(dest);
More information about the samba-technical
mailing list