Anders Broman
cd6d0b075f
Use hfi->abbrev insted.
...
svn path=/trunk/; revision=40376
2012-01-04 19:06:34 +00:00
Anders Broman
906d2aecbb
Enhance error information.
...
svn path=/trunk/; revision=40361
2012-01-03 22:06:42 +00:00
Anders Broman
4a00a8ac58
Squelsh warnings.
...
svn path=/trunk/; revision=40025
2011-11-28 16:42:43 +00:00
Jaap Keuter
f14c2c772b
Move some comments around to make it more boilerplate like.
...
svn path=/trunk/; revision=39992
2011-11-22 21:51:24 +00:00
Anders Broman
b431591727
Get rod of " warning: identifier ‘class’ conflicts with C++ keyword"
...
svn path=/trunk/; revision=39945
2011-11-19 09:08:50 +00:00
Stig Bjørlykke
89880b5b59
Increase the size of a unknown INTEGER to FT_INT64 to be able to show
...
negative integers and integers up to MAXINT64. We still don't support
integers between MAXINT64 and MAXUINT64, which would be 9 bytes long.
svn path=/trunk/; revision=39673
2011-10-30 15:55:18 +00:00
Bill Meier
293049dfba
Do some conversions of proto_tree_add_item() 'encoding' arg.
...
(previously missed).
57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN
31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN
10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA
1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA
21 FT_BYTES: FALSE-->ENC_NA
2 FT_BYTES: TRUE-->ENC_NA
2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA
6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA
1 FT_IPv6: FALSE-->ENC_NA
6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA
19 FT_NONE: FALSE-->ENC_NA
3 FT_NONE: TRUE-->ENC_NA
1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA
1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA
4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA
8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA
1 FT_INT32: FALSE-->ENC_BIG_ENDIAN
1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN
11 FT_UINT8: 0-->ENC_BIG_ENDIAN
111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN
17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN
1 FT_UINT16: 0-->ENC_BIG_ENDIAN
68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN
18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN
4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN
70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN
1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN
4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN
1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN
1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN
svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Anders Broman
4b952c1324
Get rid of check_col, while at it set ENC.
...
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Stig Bjørlykke
7f4e941ab6
Add an expert info warning for integers encoded with too many octets.
...
svn path=/trunk/; revision=38771
2011-08-29 10:01:36 +00:00
Graeme Lunt
a8d3a3ea8c
Allow the dissection of BER/DER carried over a TCP transport using
...
"Decode As..."
svn path=/trunk/; revision=38560
2011-08-16 12:28:17 +00:00
Bill Meier
a2b58f051d
Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
...
(In many cases I previously incorrectly removed the #include <stdlib.h>).
svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Anders Broman
f62ac53352
From Yaniv Kaul:
...
Fix 'set but not used' errors that GCC 4.6 emits.
svn path=/trunk/; revision=36892
2011-04-27 05:24:31 +00:00
Stig Bjørlykke
1fd17eb0d9
Fixed blurb for BER Error.
...
svn path=/trunk/; revision=36495
2011-04-06 09:59:21 +00:00
Stig Bjørlykke
3a1673c04c
Made "BER Error" filterable.
...
svn path=/trunk/; revision=36494
2011-04-06 08:52:42 +00:00
Ronnie Sahlberg
13f6b77d92
remove two pointless const in casts
...
coverity 580 and 581
svn path=/trunk/; revision=36407
2011-03-30 04:36:09 +00:00
Tomas Kukosa
0b9c645150
Fix warning
...
svn path=/trunk/; revision=36139
2011-03-04 14:36:27 +00:00
Tomas Kukosa
3f8b9e87a9
Check only first 14 digits of GeneralizedTime which are fixed, next parts are optional
...
svn path=/trunk/; revision=36138
2011-03-04 14:01:57 +00:00
Gerald Combs
dae5200002
Fix some Visual C++ analysis warnings.
...
svn path=/trunk/; revision=35988
2011-02-17 23:00:34 +00:00
Stig Bjørlykke
0ac8e7cc8d
Put error messages and expert info for illegal UTCTime elements as a
...
subtree on the UTCTime element.
svn path=/trunk/; revision=35945
2011-02-14 10:18:03 +00:00
Stig Bjørlykke
84bc28bd6a
Introduce "Fragment count" filter element for all protocols doing reassembly.
...
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Jeff Morriss
e80012653f
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5537 :
...
Don't go modifying the bitstring if its length is 0 (meaning that there is only
the NULL terminator).
svn path=/trunk/; revision=35342
2011-01-03 17:37:41 +00:00
Guy Harris
d049046268
Note that this is ultimately not necessarily the right fix.
...
svn path=/trunk/; revision=35331
2011-01-02 21:49:00 +00:00
Guy Harris
8d7d050e9e
For those cases where we interpret the contents of an OCTET STRING,
...
which could be of arbitrary length - even if it's not supposed to be! -
as a value of some other type, by adding them as a registered field,
first check to make sure the length of the field is appropriate for the
type and, if not, show a dissection error, rather than showing a
dissector-bug assertion when we call proto_tree_add_item().
This fixes a bunch of dissector-bug assertions that show up with
malformed BER-encoded packets.
Also, fix a typo, and expand a comment.
svn path=/trunk/; revision=35330
2011-01-02 21:27:57 +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
Anders Broman
bb0eefd834
Fix a cut-n-paste error.
...
svn path=/trunk/; revision=34866
2010-11-14 14:13:52 +00:00
Anders Broman
2c042dcd15
Use value_string_ext.
...
svn path=/trunk/; revision=34845
2010-11-11 21:18:15 +00:00
Stig Bjørlykke
34d9ef736b
Added an expert info for illegal integer length.
...
svn path=/trunk/; revision=34820
2010-11-09 12:17:11 +00:00
Stig Bjørlykke
c56ac0d6db
Removed calls to proto_item_set_expert_flags(), as this will be called
...
in expert_add_info_format().
svn path=/trunk/; revision=34819
2010-11-09 12:15:55 +00:00
Jeff Morriss
e17b9ccec1
Rev 29427 added packet_add_new_data_source() with a comment indicating that
...
the data source does not need to be allocated if (!tree).
Rev 30158 took the if (!tree) check out indicating that the check was invalid.
So: (since packet_add_new_data_source() now only calls add_new_data_source()),
remove packet_add_new_data_source().
svn path=/trunk/; revision=34717
2010-10-30 16:00:30 +00:00
Guy Harris
17d4d51b7d
Make the third argument to a UAT copy callback a size_t (not that any of
...
the callbacks we have use that argument - is it really needed?).
svn path=/trunk/; revision=34694
2010-10-29 21:11:33 +00:00
Martin Mathieson
9d87437659
Add volatile in several places to gcc warnings.
...
svn path=/trunk/; revision=34526
2010-10-15 18:41:12 +00:00
Stig Bjørlykke
2b34ed288b
Avoid getting BoundsError when trying to decode OCTET STRING or
...
unknown primitive as constructed ASN.1 BER encoded data.
svn path=/trunk/; revision=34520
2010-10-15 11:10:20 +00:00
Stig Bjørlykke
7c3f2513ee
Remove unneeded includes.
...
svn path=/trunk/; revision=34289
2010-09-30 19:20:59 +00:00
Stig Bjørlykke
65e0721f71
Constructed octet strings may contain zero encodings.
...
(X.690 chapter 8.7.3)
svn path=/trunk/; revision=34284
2010-09-30 06:19:32 +00:00
Gerald Combs
4c74418400
Attempt to fix the stack overflow reported at
...
http://seclists.org/bugtraq/2010/Sep/87 .
Unfortunately no one from the NCNIPC pen test team has contacted us or
provided a sample capture so the fix hasn't been verified.
svn path=/trunk/; revision=34111
2010-09-13 18:49:55 +00:00
Stig Bjørlykke
16db2dd4f5
Check if using tree before adding the octet string.
...
svn path=/trunk/; revision=34055
2010-09-03 08:44:00 +00:00
Stig Bjørlykke
598b89ab7f
Added a check for constructed octet string to avoid a loop.
...
This fixes bug 5154.
svn path=/trunk/; revision=33949
2010-08-27 11:55:14 +00:00
Stig Bjørlykke
8b6c6a3dbf
Display constructed octet strings with correct hf_id.
...
Show octet string fragments as for reassembly.
svn path=/trunk/; revision=33910
2010-08-24 15:08:07 +00:00
Gerald Combs
3a5ba15b4d
Rename a variable. "tmp_len" was too similar to "tmp_length".
...
svn path=/trunk/; revision=33506
2010-07-13 22:49:17 +00:00
Gerald Combs
041cd31c9e
Revert get_ber_length() back to r32530, which removes all of the changes
...
back to and including my attempt to make it iterative. Move its guts
back into try_get_ber_length() and add a recursion level check.
This should fix CVE-2010-2284 and preserve existing behavior without
introducing any new regressions (such as bug 5000).
svn path=/trunk/; revision=33505
2010-07-13 22:41:34 +00:00
Gerald Combs
cfe9b05691
Add length checks.
...
svn path=/trunk/; revision=33488
2010-07-12 17:30:14 +00:00
Gerald Combs
edb7f000dc
Assume that if we have more than 500 levels of nested indefinite lengths
...
we have a malformed packet.
svn path=/trunk/; revision=33480
2010-07-09 17:07:34 +00:00
Jeff Morriss
4e76ef92cb
For: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4984#c4 : In try_get_ber_length() don't let a negative length make us go backwards. This should eliminate a possible infinite loop and appears to /help/ limit the depth of recursion.
...
svn path=/trunk/; revision=33471
2010-07-07 22:00:44 +00:00
Jeff Morriss
c24f16ad44
Fix infinite recursion reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4984 : In try_get_ber_length() make sure we move forward before recursing.
...
svn path=/trunk/; revision=33464
2010-07-07 15:52:09 +00:00
Gerald Combs
a7df969fb1
Have get_ber_length() set the length to 0 by default. This restores behavior
...
that was lost recently.
svn path=/trunk/; revision=33402
2010-07-01 16:35:37 +00:00
Graeme Lunt
852d60ca7e
When determining a BER length, make sure the BER identifier was marked as constructed if an indefinite length is encountered.
...
This helps prevent a stack overflow problem reported in Bug 4951.
svn path=/trunk/; revision=33383
2010-06-30 10:06:21 +00:00
Stig Bjørlykke
e777398d4f
Added expert info for illegal bitstring padding and when bits are set
...
in the padded area.
svn path=/trunk/; revision=33382
2010-06-30 09:09:18 +00:00
Bill Meier
9427f9f2c3
Hack to prevent checkAPIs.pl from complaining about missing const in
...
'static value_string syntax_names[...]'
svn path=/trunk/; revision=33365
2010-06-29 03:43:17 +00:00
Gerald Combs
a9650cd851
Don't try to use a NULL tvb in call_ber_oid_callback(). Fixes bug 4950.
...
svn path=/trunk/; revision=33363
2010-06-29 00:44:41 +00:00
Gerald Combs
a514fe61c3
tvb_get_ptr() may not return a valid string. Must I break out the
...
picture of the cow again?
svn path=/trunk/; revision=33361
2010-06-28 23:11:48 +00:00