Commit Graph

59 Commits

Author SHA1 Message Date
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Jörg Mayer f737cea032 emem -> wmem
svn path=/trunk/; revision=52038
2013-09-14 14:33:04 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Jeff Morriss c44883cb1a From Роман Донченко via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9018 :
This patch enables Wireshark to correctly decode messages specific to the
selected key exchange method by determining and remembering that method.
It's a little incomplete in that it doesn't support the case where
first_kex_packet_follows is true, but then the current implementation
doesn't either.

It also adds/fixes dissection for the plain Diffie-Hellman key exchange and
DH group exchange messages that were broken/missing, completing support for
both of these key exchange methods.

svn path=/trunk/; revision=51197
2013-08-07 22:20:49 +00:00
Jeff Morriss bb6004a017 From Роман Донченко via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9010 :
This patch fixes a bug where if the client identifies itself first, both of
the protocol version messages are misidentified as encrypted data.

svn path=/trunk/; revision=51151
2013-08-05 14:53:19 +00:00
Jeff Morriss 1c0960e4a9 From Роман Донченко via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9006 :
Currently, Wireshark only dissects one side's Key Exchange Init message,
which, in particular, means that the encryption, MAC and compression
algorithms it infers are bogus.

This patch fixes that.

From me:

Don't use a macro which confused checkhf (it only saved a small amount of
visible code).  Fix up some more white space.

Use macros for a couple array indexes.

svn path=/trunk/; revision=51126
2013-08-02 21:56:28 +00:00
Jeff Morriss cbcd704280 From ?\208?\160?\208?\190?\208?\188?\208?\176?\208?\189 ?\208?\148?\208?\190?\208?\189?\209?\135?\208?\181?\208?\189?\208?\186?\208?\190 via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9004 :
This patch makes the SSH dissector able to display multiple messages in the
Info column. As a side effect, it changes the formatting of some messages to
be more uniform.

I've also removed a dubious chunk of code that hardcodes a 16-byte MAC after
a SSH_MSG_KEX_DH_GEX_REPLY message. There can't be a MAC before key exchange
is over, and in my sample capture, this actually eats the second message that
follows.

From me: some white space cleanup.

svn path=/trunk/; revision=51117
2013-08-02 14:28:29 +00:00
Jeff Morriss 588bc03a5b From Роман Донченко via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8977 :
In SSH, the protocol version message is terminated by CR LF. Wireshark, in the
info column, strips out the LF, but not the CR.

Attaching a patch to rectify that.

Also, as requested, update the contributor's email address in AUTHORS.

svn path=/trunk/; revision=50902
2013-07-26 01:35:44 +00:00
Michael Mann b0090fd046 Batch of filterable expert infos
svn path=/trunk/; revision=49600
2013-05-27 23:21:11 +00:00
Pascal Quantin aec6d0a755 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from ssl and ssh files

svn path=/trunk/; revision=48174
2013-03-07 18:37:58 +00:00
Michael Mann 4e27a8a034 Improve SSH state machine so IGNORED messages don't upset the dissection by throwing the "packet count" off.
Bug 5064 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5064)

svn path=/trunk/; revision=47723
2013-02-17 23:00:57 +00:00
Michael Mann 4da35cc956 Add support for IGNORE message type to SSH2 dissector + some minor cleanup
I was hoping this would fix bug 5064 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5064), but all it did was fix the malformed part of the dissector.

svn path=/trunk/; revision=47601
2013-02-10 02:27:08 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Michael Mann 3082032be6 convert GStrings to more "ephemeral friendly" use.
svn path=/trunk/; revision=44515
2012-08-15 13:56:59 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 96beb44145 From Evan Huus Useless null check in packet-ssh.c https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7319
svn path=/trunk/; revision=42996
2012-06-02 13:25:02 +00:00
Jakub Zawadzki 23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Michael Tüxen 34d5241775 Add support for SSH over SCTP.
svn path=/trunk/; revision=41556
2012-03-15 08:23:26 +00:00
Michael Tüxen f71f3decb6 Dissect SSH over SCTP when using the IANA assigned SCTP port 22.
svn path=/trunk/; revision=41197
2012-02-26 17:54:32 +00:00
Bill Meier 20e3e0b5b5 Fix some proto_tree_add_item() encoding args;
In some files:
 Remove a few unneeded #includes;
 Do some whitespace/indentation cleanup

svn path=/trunk/; revision=39635
2011-10-27 15:59:12 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Stig Bjørlykke 27344a90fe Removed some unneeded assignments.
Found by clang.

svn path=/trunk/; revision=36698
2011-04-18 15:29:25 +00:00
Jeff Morriss cc6fc23812 From Didier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3055 :
Apply rev 25869 to most of the rest of the TCP-desegmenting dissectors.
(The SSL dissector was already updated in one of two spots with bug 4535/rev
32456.)

A couple of the patches had to be manually applied.

From me: Fix the comments to match the change (including in the TCP and SSL
dissectors.)

svn path=/trunk/; revision=36332
2011-03-25 19:02:18 +00:00
Stephen Fisher df6e1f362b Add #define and value_string entries for the remaining SSH message type
numbers as defined in RFC 4250.


svn path=/trunk/; revision=35246
2010-12-22 19:46:57 +00:00
Stephen Fisher 6a76081482 Change prefixes in #define:
SSH -> SSH1
  SSH2 -> SSH

This will make it easier to compare the code to the SSH RFCs, which only
cover SSH version 2.


svn path=/trunk/; revision=35245
2010-12-22 18:53:21 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Stephen Fisher 6c1e90bfd0 Mention SSHv2 RFCs
svn path=/trunk/; revision=35035
2010-11-26 23:33:05 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Bill Meier 548e468959 Misc dissector cleanup:
- Make some fcns & vars static
- hf[] blurbs: "" and repeated text --> NULL
- Move proto_register & proto_reg_handoff to end of source
- packet-catapult-dct2000: simplify proto_reg_handoff
- Use consistent indentation

svn path=/trunk/; revision=28488
2009-05-26 16:01:12 +00:00
Bill Meier 7172127412 #include reassemble.h not req'd
svn path=/trunk/; revision=27911
2009-03-31 12:08:44 +00:00
Stephen Fisher ab972611da Remove extra parenthesis on two lines
svn path=/trunk/; revision=27871
2009-03-27 20:16:15 +00:00
Stephen Fisher d3be9b80a9 Put the new tvb_get_seasonal_string() function to good use.
svn path=/trunk/; revision=27869
2009-03-27 19:41:18 +00:00
Sake Blok b16a64c80c From didier gautheron (bug 3178):
move need_desegmentation test before exception handling


svn path=/trunk/; revision=27170
2009-01-06 19:06:43 +00:00
Stig Bjørlykke e6a22e689e Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Gerald Combs 60851c5b71 Make sure a struct is completely initialized before we try to use it. Fixes
bug 2751.

svn path=/trunk/; revision=25861
2008-07-29 17:29:09 +00:00
Guy Harris f4cbe1fea9 Include <string.h> to declare strcmp().
svn path=/trunk/; revision=25403
2008-05-30 05:46:24 +00:00
Guy Harris a040608bbb g_strcmp0() only shows up on the Intarweb in documentation for some
testing version of GLib; it doesn't appear to exist in any current
versions.  There's no need to "gracefully" handle NULL (whatever
"gracefully" means in this context - NULL compares less than any real
string?), as we already checked whether mac_name is null, and we're
comparing it against a string constant; just use strcmp().

In ssh_gslist_compare_strings(), check for null pointers for now.

strcmp() (and strcmp-alikes) don't return a boolean, they return a value
such that comparing strings with a particular operator is done by
comparing the result of strcmp() with 0 using that operator; do that, to
make it clearer that the strings are being compared for equality.

svn path=/trunk/; revision=25402
2008-05-30 05:19:54 +00:00
Stephen Fisher 1fc6505fb8 From Kees Cook via bug #2577 (with minor modifications by me):
provide more detailed SSH dissection


svn path=/trunk/; revision=25397
2008-05-30 02:13:30 +00:00
Martin Mathieson fbefbac6fa Select correct bytes range for Algorithms tree.
svn path=/trunk/; revision=25251
2008-05-07 10:22:48 +00:00
Martin Mathieson a91cce4b1f From Abhik Sarkar, fixed bug #2477.
Change ftype of ssh-padding-string to FT_BYTES.


svn path=/trunk/; revision=25194
2008-04-29 14:24:16 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Sebastien Tandel 68ad2f4b9b fix MacOSX gcc-3.3 warnings about unused tfs/value_string variables
most have been tagged unused (few have been deleted if dissector has not been
modified since a long time)

move packet-ssl-utils.c to DISSECTOR_SRC


svn path=/trunk/; revision=21431
2007-04-14 14:01:53 +00:00
Ronnie Sahlberg d5d5159b6d From Sebastien Tandel
fixes for various compiler warnings

svn path=/trunk/; revision=21210
2007-03-26 11:06:26 +00:00
Gerald Combs 8b315480f1 In new_format_oid(), handle a zero-length OID.
Fix a bug introduced recently in packet-rpc.c.

Replace DISSECTOR_ASSERT() with THROW(ReportedBoundsError) in my recent 
checkins, since fuzz-test.sh sets WIRESHARK_ABORT_ON_DISSECTOR_BUG.

svn path=/trunk/; revision=18693
2006-07-09 22:12:02 +00:00
Gerald Combs 6dd2196da6 One more bug from Ilja van Sprundel. Be more paranoid about our offset during
a loop.  Fix up whitespace.

svn path=/trunk/; revision=18692
2006-07-09 17:58:28 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00