Commit Graph

72 Commits

Author SHA1 Message Date
Ronnie Sahlberg 7e5f31b6a0 updates for FILE_OBJECTID_BUFFER and have smb call this (no more unknown bytes in smb for objectid)
svn path=/trunk/; revision=16682
2005-12-05 21:22:06 +00:00
Ronnie Sahlberg 55beaa37cf add endoffile infolevel
svn path=/trunk/; revision=16607
2005-11-26 21:59:48 +00:00
Ronnie Sahlberg f699f011fc more infolevels
svn path=/trunk/; revision=16606
2005-11-26 21:44:37 +00:00
Ronnie Sahlberg d149d98fc3 assume the four bytes after the fid in notify request is the completion mask
svn path=/trunk/; revision=16596
2005-11-26 00:34:22 +00:00
Ronnie Sahlberg 85cfb618f9 from metze and modified, fix for in offset/length for transaction request
svn path=/trunk/; revision=16589
2005-11-25 21:55:34 +00:00
Ronnie Sahlberg 704abdc0e5 add some more infolevels
svn path=/trunk/; revision=16585
2005-11-25 08:02:40 +00:00
Ronnie Sahlberg 261aade300 add dissection of the smb2 impersionationlevel field
svn path=/trunk/; revision=16581
2005-11-25 06:19:41 +00:00
Ronnie Sahlberg c76c376968 some info level updates
svn path=/trunk/; revision=16580
2005-11-25 06:04:11 +00:00
Ronnie Sahlberg cfc56af514 some info level updates
svn path=/trunk/; revision=16579
2005-11-25 05:41:00 +00:00
Ronnie Sahlberg e2ef8b1632 fix for bug 570, the domain name is present in sessionsetupandx replies even for wc==4
svn path=/trunk/; revision=16550
2005-11-19 10:27:16 +00:00
Ronnie Sahlberg 3f047721a3 dissect some more infolevels
svn path=/trunk/; revision=16543
2005-11-18 07:31:18 +00:00
Ronnie Sahlberg 3afd94f519 add dissection of more infolevels for smb2
svn path=/trunk/; revision=16539
2005-11-17 22:30:19 +00:00
Ronnie Sahlberg e5b6a6426b add dissection of fs_[objectid|full_size]_info
svn path=/trunk/; revision=16538
2005-11-17 14:22:11 +00:00
Ronnie Sahlberg 6ac4fe9a25 add dissection of fs quota info
svn path=/trunk/; revision=16537
2005-11-17 14:00:07 +00:00
Ronnie Sahlberg 1b809cfcd7 add full dissection of fs_[volume|size|device|atrtibute]_info
svn path=/trunk/; revision=16536
2005-11-17 13:43:22 +00:00
Ronnie Sahlberg 675d0862b5 add dissection of the security descriptor mask
svn path=/trunk/; revision=16535
2005-11-17 12:30:36 +00:00
Ronnie Sahlberg 7d0ed23854 from Laurent Constantin
updates to smb
A patch for packet-smb.c is attached:
 - it improves timeout decoding
 - it defines common NT transaction IOCTL functions
 - it corrects decoding of resume key in search queries
 - it defines a new function dissect_4_2_16_8_unsure() to replace
   dissect_4_2_16_8(). I'm unsure if it is correct. As said in
   comments, it works for me, but I find strange that nobody noticed
   dissect_4_2_16_8() was wrong. So, it is between "#if 0".
   Someone else should confirm dissect_4_2_16_8_unsure() works
   before activating it.



svn path=/trunk/; revision=16494
2005-11-12 21:56:02 +00:00
Ronnie Sahlberg 15f13b23a0 improve the dissection of Create and fill in most of the fields
svn path=/trunk/; revision=16490
2005-11-12 11:27:34 +00:00
Ronnie Sahlberg 8b68d91039 dissect more of Close request/response
svn path=/trunk/; revision=16487
2005-11-12 10:07:12 +00:00
Guy Harris 2a8e47b11a Don't ensure all the bytes of a security descriptor exist before calling
"dissect_nt_sec_desc()".  Add a Boolean argument to
"dissect_nt_sec_desc()" to indicate whether a length was passed to it
(so we don't treat -1 as a special value; we want to stop treating -1 as
a special length value, and, in fact, want to stop treating *any*
negative length values specially, so that we don't have to worry about
passing arbitrary 32-bit values from packets as lengths), and have
"dissect_nt_sec_desc()" initially create the protocol tree item for the
security descriptor with a length of "go to the end of the tvbuff", and
set the length once we're done dissecting it - and, if the length was
specified, check at *that* point, *after* we've dissected the security
descriptor, whether we have the entire security descriptor in the
tvbuff.

That means that we don't have to worry about overflows after
"dissect_nt_sec_desc()" returns - if the length was so large that we
would have gotten an overflow, we'd have thrown an exception in the
"tvb_ensure_bytes_exist()" call at the end of "dissect_nt_sec_desc()".

Do sanity checks on offsets within the security descriptor, so we know
the item referred to by the offset is after the fixed-length portion of
the descriptor.

svn path=/trunk/; revision=16113
2005-10-04 10:23:40 +00:00
Guy Harris 7aa4b4ffe1 Make "top_tree" static; nobody else uses it, and if they're both not
static, they collide with one another in builds on at least some
platforms.

svn path=/trunk/; revision=16049
2005-09-29 01:31:19 +00:00
Ulf Lamping 9a42ef9536 fix #480: Change defaults for all reassembling settings to ON
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often.

svn path=/trunk/; revision=16048
2005-09-28 22:15:38 +00:00
Guy Harris ab2dca9114 Move some headers for stuff defined by a dissector into epan/dissectors
- and rename smb.h to packet-smb.h, as it's packet-smb.c's header file.

svn path=/trunk/; revision=15845
2005-09-17 00:31:15 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Gerald Combs a242f1926b In smb_trans_defragment(), throw an exception if we encounter a too-large
fragment size.  The limit is conservatively set at 65536 bytes.  It may
have to be increased.  Fixes bug 421.

Add an entry to the release notes.

svn path=/trunk/; revision=15789
2005-09-13 19:01:01 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Ulf Lamping 925489be0b removed MSVC warnings:
packet-camel.c(6829) : warning C4101: 'version_str' : unreferenced local variable
packet-quakeworld.c(172) : warning C4090: 'return' : different 'const' qualifiers
packet-smb.c(10859) : warning C4101: 'target_name_len' : unreferenced local variable
packet-smb.c(10860) : warning C4101: 'fn_len' : unreferenced local variable
packet-smb.c(10858) : warning C4101: 'fn' : unreferenced local variable

svn path=/trunk/; revision=15474
2005-08-20 15:58:42 +00:00
Guy Harris e5c09b21aa Use get_timedelta() to get the difference between two times.
svn path=/trunk/; revision=15455
2005-08-20 02:15:02 +00:00
Gerald Combs 88f6cd56ee Restore pinfo->private_data after calling another dissector, in case it gets
overwritten.  Fixes bug 367.

svn path=/trunk/; revision=15435
2005-08-19 18:28:50 +00:00
Ulf Lamping 495eb1b788 snprintf -> g_snprintf
svn path=/trunk/; revision=15398
2005-08-17 23:10:28 +00:00
Ronnie Sahlberg 75f38fa0a5 add SetFileInfo level 1013 SetDispositionInfo decoding
svn path=/trunk/; revision=15374
2005-08-16 08:40:06 +00:00
Ronnie Sahlberg c30eeef7d8 some more gmemchunk -> se_alloc() updates
there are only 5 gmemchunks left   but they have different litetime for their allocations   than the 100+   ones that have been removed.

The remaining 5 should be converted some other way.




svn path=/trunk/; revision=15328
2005-08-13 01:29:31 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Guy Harris 7b31da8b11 DissectorError is not supposed to be directly thrown; one should use the
various DISSECTOR_ macros, so the error message includes an indication
of the problem, and the file and line number.

svn path=/trunk/; revision=15237
2005-08-06 04:01:38 +00:00
Gerald Combs b992c73391 In packet-frame.c, don't free static memory when we throw a
DissectorError.  In packet-kerberos.c, restore pinfo->private_data if
we throw an exception, which keeps the SMB dissector from throwing
a DissectorError.  Initialize variables in other places to squelch
valgrind warnings.

svn path=/trunk/; revision=15235
2005-08-06 03:43:42 +00:00
Jörg Mayer 69dcb66cd9 More char -> const char warning fixes
svn path=/trunk/; revision=15218
2005-08-05 00:23:22 +00:00
Ronnie Sahlberg 0d7a2abbc7 some more memification of tvb_get_string() no obvious memleaks fixed this time :-(
svn path=/trunk/; revision=15131
2005-07-28 09:47:28 +00:00
Ronnie Sahlberg 9f6a3801d9 minor fix to add required alignment for AueryPathInfo level 0x107
it decodes "better"   but might still be broken since none of the packets I have match any of the "standards"




svn path=/trunk/; revision=14952
2005-07-19 08:58:20 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Ulf Lamping debc4cd849 packet-smb.c(14406) : warning C4090: 'return' : different 'const' qualifiers
svn path=/trunk/; revision=14780
2005-06-26 11:21:39 +00:00
Ulf Lamping e2c3b60280 add a generated toplevel line between the TCP protocol and the desegmented content, to better understand what's going on while desegmenting.
We'll have to add similar mechanisms for other protocols as well...

svn path=/trunk/; revision=14527
2005-06-02 18:52:55 +00:00
Ulf Lamping 5c4f877031 bugfix (fuzz_tested): t2i can be zero, test at all places before using it
svn path=/trunk/; revision=14526
2005-06-02 18:44:17 +00:00
Ulf Lamping e8c5cd2342 don't go into an (almost) endless loop, if si->info_count is -1, which is the default value. Seems to be a general bug worth to thought about, but I don't know the SMB internals and this bugfix should work anyway.
Found this by a privately fuzzed capture file (sorry, can't give it away)

svn path=/trunk/; revision=14501
2005-05-30 21:10:21 +00:00
Ulf Lamping feb55854c7 fix #215: the field hf_smb_print_spool_file_name used the wrong type, use FT_STRINGZ to add a string
svn path=/trunk/; revision=14482
2005-05-30 03:10:37 +00:00
Gerald Combs 7effa95f95 Throw an exception if AndXOffset is less than the current offset. Fixes bug
163.  I'm not sure if this fix is entirely correct, but it doesn't appear to
have affected any SMB captures here adversely.

svn path=/trunk/; revision=14365
2005-05-14 19:13:02 +00:00
Gerald Combs fe5561715b Don't try to feed a null pointer to strncmp(). Fixes bug 158.
Shouldn't the number of fuzz bugs decrease asymptotically at some
point?

svn path=/trunk/; revision=14306
2005-05-04 17:02:56 +00:00
Gerald Combs 1111832d96 In all functions that require smb_info data, throw an exception if we
can't fetch it.  Fix a few more null pointer dereferences.  Fixes bug 79.

svn path=/trunk/; revision=14149
2005-04-20 16:23:22 +00:00
Gerald Combs 83f3aa6e08 Add an extra_info_type field to smb_extra_info_t so that we can make
sure we're not referencing a fid when we think we're referencing an
smb_nt_transact_info_t pointer.  (A fuzzed capture I have triggers
this behavior).


svn path=/trunk/; revision=14107
2005-04-16 21:54:32 +00:00
Gerald Combs 5f4347c46d Add a bunch of tvb_ensure_bytes_exist() calls. Some of these may not be
neccessary -- someone more knowledgeable about the SMB dissector may want
to check this.  Throw a ReportedBoundsError instead of exiting.

svn path=/trunk/; revision=14077
2005-04-14 19:43:00 +00:00
Gerald Combs 3056b9e17d Add a tvb_ensure_bytes_exist().
svn path=/trunk/; revision=13968
2005-03-29 15:38:11 +00:00