1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
samba-mirror/source3
Andrew Tridgell 008b773834 fix the handling of negative name query responses and the handling of
packets with no answer section in general.

The fix has 2 parts:

1) set ans_name to the name we queried if nmb->answers == NULL

2) check for nmb->answers == NULL in several other places where we
currently check for nmb->answers->data

While doing this, I noticed there are lots of places in our nmbd code
where we make assumptions about the packets being well formed. Someone
could easily implement a denial of service attack on nmbd by sending a
packet that causes a null pointer dereference. Does anyone feel like
going through the code and adding checks? Probably the best solution
is to have a single function that "validates" a packet, making sure
that all the required fields are there. This will be a bit tricky as
what fields are required varies a lot between packets. A first pass
would be a function that prints "SUSPECT PACKET" when it hits a packet
that it suspects does not have a required field (or the field is badly
formatted), then we could use this on a live system to find any cases
we've missed.

Any takers?
(This used to be commit e02c21b0b8)
1997-10-17 02:56:23 +00:00
..
client add ERRDOS/67 ERRnosuchshare to the client.c list of error strings 1997-10-16 08:01:00 +00:00
codepages Adding codepage definition files and codepage file compiler/decompiler. 1997-08-30 01:13:39 +00:00
include smb.h : 1997-10-16 16:01:25 +00:00
lib added loopback_ip. This is used to detect packets from ourselves 1997-10-15 09:16:30 +00:00
libsmb smb.h smbparse.c pipenetlog.c : 1997-10-15 19:16:38 +00:00
locking ipc.c: Adding Andrews become_root code to the main branch. 1997-10-15 21:53:59 +00:00
nmbd added -a "append log" option 1997-10-17 01:46:16 +00:00
param fixed the problem that browsing breaks if you put quote marks around 1997-10-16 03:53:07 +00:00
passdb This commit does 3 main things: 1997-09-14 16:37:18 +00:00
printing Adding Andrews buffer overflow fixes into the main branch. 1997-09-26 18:55:29 +00:00
script JHT ==> Fixing blocksize argument. Patch by: Llyod Whiteman 1997-10-07 16:01:08 +00:00
smbd Added Michael Johnsons' PAM modifications <johnsonm@redhat.com> 1997-10-16 05:33:24 +00:00
utils reverted a change made by Luke at his request. 1997-10-13 13:49:50 +00:00
web cgi.c is a simple set of CGI manipulation routines 1997-09-11 02:17:16 +00:00
.cvsignore JHT ==> Added just for RedHat support so I have a working copy of the RPM 1997-01-03 12:17:12 +00:00
arcfour.c Added arcfour code needed for SMB password changing. 1997-09-18 19:56:57 +00:00
arcfour.h Makefile: Changed proto: target to not include c files not used currently. 1997-09-19 17:12:08 +00:00
cgi.c cgi.c is a simple set of CGI manipulation routines 1997-09-11 02:17:16 +00:00
change-log Started uninstall in Makefile 1996-07-04 03:17:08 +00:00
internals.doc - sequent-ptx support from bressler@iftccu.ca.boeing.com (Rick 1996-08-13 08:57:55 +00:00
lsaparse.c another alignment of client challenge: this one in lsa_io_q_auth_2(). 1997-10-13 19:37:43 +00:00
nameannounce.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
nameannounce.doc - added "netbios name" option in smb.conf to make controlling the name 1996-08-19 11:17:29 +00:00
namebrowse.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
namebrowse.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
nameconf.c Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk> 1997-07-08 16:54:44 +00:00
namedbname.c Adding Andrews buffer overflow fixes into the main branch. 1997-09-26 18:55:29 +00:00
namedbname.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
namedbresp.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
namedbresp.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
namedbserver.c client.c: New print queue query code from Jeff C. Foster " <jfoste@wgc.woodward.com> 1997-07-01 01:19:13 +00:00
namedbsubnet.c local.h: Fix spelling mistake :-). 1997-10-09 18:40:52 +00:00
namedbwork.c Fixing assumtions that malloced memory is zero filled - making 1997-09-16 17:40:17 +00:00
nameelect.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
nameelect.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
namelogon.c namelogon.c : 1997-10-11 15:10:57 +00:00
namelogon.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
namepacket.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
namepacket.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
namequery.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
nameresp.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
nameresp.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
nameserv.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
nameserv.doc updated doc files to include a GPL header, with revision history in it. 1996-08-01 19:25:01 +00:00
nameservreply.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
nameservreply.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
nameservresp.c fix the handling of negative name query responses and the handling of 1997-10-17 02:56:23 +00:00
nameservresp.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
namework.c fixed the freeze on logout bug. The fix has several parts: 1997-10-15 09:15:45 +00:00
namework.doc updating documentation to reflect code a little bit. 1996-08-05 18:18:58 +00:00
nmbsync.c Adding Andrews buffer overflow fixes into the main branch. 1997-09-26 18:55:29 +00:00
pipenetlog.c dealing with some stack overflow bug somewhere around the use of 1997-10-16 13:38:16 +00:00
pipentlsa.c pipentlsa.c : 1997-10-14 19:31:07 +00:00
pipeutil.c byteorder.h: 1997-10-14 18:37:55 +00:00
smbadduser JHT ==> Removed linefeed that caused problems. 1997-10-13 12:13:11 +00:00
smbparse.c smb.h : 1997-10-16 16:01:25 +00:00
ubi_dLinkList.c This code manages a simple doubly-linked list. 1997-10-16 00:55:11 +00:00
ubi_dLinkList.h This code manages a simple doubly-linked list. 1997-10-16 00:55:11 +00:00
wsmbconf.c This commit does 3 main things: 1997-09-14 16:37:18 +00:00
wsmbstatus.c cgi.c is a simple set of CGI manipulation routines 1997-09-11 02:17:16 +00:00