Commit Graph

44252 Commits

Author SHA1 Message Date
Guy Harris db27fb777a exceptions: make the exception handler stack per-thread.
This prevents the weird failures I saw on macOS in #17856; instead, it
should fail on *all* platforms with

    Unhandled exception ("epan/proto.c:8800: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"", group=1, code=6)

(which it does on macOS 11.6/Xcode 12.5.1 and Windows 10/VS 2019
16.11.8; according to

https://en.wikipedia.org/w/index.php?title=Thread-local_storage&oldid=1064900318#C_and_C++

the major UN*X C compilers support __thread and the major Windows C
compilers support __declspec(thread).).

@jvalverde: on branches that require C11/C++11 support, we could perhaps
just use _Thread_local for C and thread_local for C++.  Note that
<thread.h> is optional in C11, and macOS 11.6/Xcode 12.5.1 does not
appear to include it.)

This does not *fix* the aforementioned issue; to do *that* we need to do
TRY in the register-dissectors thread code.  I'm committing this
separately because it fixes a bug in our exception package that could
cause all sorts of randomness now and in the future - what we're doing
now is Just Wrong.

(Yes, there's code to support per-thread exception handler stacks *on
platforms with pthreads*, but this is simpler *and* also works on
Windows.)
2022-01-11 05:00:42 +00:00
Gerald Combs b7ab0fc1cd SSH: Add back a NULL check.
d4a3aabc originally had this check, but I misread the GLib documentation
& source, and requested that Lars remove it.
2022-01-10 11:48:21 -08:00
Dr. Lars Völker b3d5ace216 PTP: ITU-T OUI as define instead of constant (cleanup) 2022-01-10 13:33:35 +00:00
Dr. Lars Völker 5e26c1cf8c PTP: Adding 802.1AS-2020 1-step Sync support
This patch adds support for 802.1AS-2020 Sync with 1-step as they carry
the originTimestamp and the Follow_UP TLV.

This patch also corrects that 802.1AS Sync with 2-step DO NOT have the
originTimestamp but "reserved" data.

Based on MR 2638.
2022-01-10 12:32:40 +01:00
Roman Volkov 869b84631d dvb: unify some 'Length' fields
Unify the last hex 'Length' fields displaying, make them decimal
as other ones.
2022-01-09 22:16:27 +02:00
Gerald Combs e71ab6dde5 [Automatic update for 2022-01-09]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-09 16:38:45 +00:00
Huang Qiangxiong 9a681f88ad http2/grpc: make fake headers be used in uncompleted HPACK index table situation
Some http2 headers are unable to be parse in current
HEADERS frame because previous HEADERS frames were not
captured that causing HPACK index table not completed.
This commit make fake headers can also be used in this
situation.

close #17799
2022-01-09 14:35:27 +00:00
Dr. Lars Völker d4a3aabc27 SSH: Make code more robust regards NULL pointer deref 2022-01-09 12:47:04 +01:00
Martin Kaiser 1774e373f3 imf: dissect some more headers
Add support for Lines, Precedence and X-Original-To headers.
2022-01-09 11:26:42 +00:00
Dr. Lars Völker bb1fb0624c SOME/IP: Adding taps and statistics
Added:
- SOME/IP Messages tap and statistics
- SOME/IP-SD Entry tap and statistics
2022-01-09 10:49:23 +00:00
Jaap Keuter 479175d044 CFM: Add CSF PDU dissection 2022-01-09 10:48:44 +00:00
Roman Volkov 21833071dc mp2t: add descriptions for additional reserved PIDs
According modern EN 300 468 releases reserved PID list includes not
only range 0x00...0x0F from ISO 13818-1 but 0x10...0x1F also.
I added descriptions of the second ones from DVB BlueBook A038r14.

Formally, due to old ISO 13818-1, values 0x10...0x1F (among others)
may be used freely for other purposes but I didn't see such appliance.
2022-01-09 08:41:38 +00:00
Dr. Lars Völker af8e134b18 Signal-PDU: Fixing description of Signal List UAT 2022-01-09 08:31:13 +00:00
Sharon Brizinov d9023299e3 fixing heap overflow oob read 1 byte 2022-01-08 09:29:17 +00:00
Dr. Lars Völker bfd2adde4b SSH: Fix Key Exchange Init (20) is not shown anymore
This fixes a bug in Wireshark that prevented the Payload to be dissected
and shown.
2022-01-08 02:21:50 +01:00
John Thacker c84430185b ssh: Fix CentOS 7
One line got left out of the previous commit to fix compilation.
2022-01-07 19:44:25 -05:00
Pau Espin 3706edc8ca iuup: Avoid Malformed warning if IuUP contains no payload
IuUP frames with 0-byte length payload are allowed. This can be done by
specifying a NO_DATA RFCI, with all subflow lengths set to 0.
2022-01-07 23:01:35 +00:00
Pau Espin 4b7bc50e68 iuup: Remove _U_ param attribute on used param 2022-01-07 23:01:35 +00:00
Dr. Lars Völker 0e5148e9ee TECMP: Fix warning that dissector_add_uint is called too often 2022-01-07 22:47:26 +00:00
John Thacker 2287014f04 ssh: Fix with gcrypt < 1.7.0 (CentOS 7, SLES 12)
Recent commits 2874b979ad c187020304
7356889242, a2f6b079f1 have lines that
need to be protected by ifdef guards when SSH_DECRYPTION_SUPPORTED
isn't defined. (gcrypt < 1.7.0)

Fixes build.
2022-01-07 11:48:45 -05:00
Dr. Lars Völker cac5c086ed TECMP: Support signed analog values
This patch allows to configure TECMP Payload to interpret analog samples
as int16 instead of uint16.
2022-01-07 13:53:12 +00:00
Jérôme HAMM a2f6b079f1 Displaying decrypted data. 2022-01-07 13:42:33 +00:00
Jérôme HAMM 7356889242 Adding secret management in DSB. 2022-01-07 13:42:33 +00:00
Jérôme HAMM c187020304 Enhancing debug logs. 2022-01-07 13:42:32 +00:00
Jérôme HAMM 2874b979ad Changing format of secret key file. 2022-01-07 13:42:32 +00:00
John Thacker c14d731e45 CMS: get rid of globals
Get rid of the global content_tvb and object_identifier_id in
the CMS dissector, and put them in a packet scoped proto data
struct, so that when there's a non fatal exception retrieving
the OID we don't use the global value from a previous packet
(or worse, file), since what the content_tvb and object_identifier_id
pointed to were both packet scoped that could lead to memory
access violations.

Clear the values of the OID and the content_tvb each time before
they are retrieved, so that values from a previous PDU of CMS
in the same packet aren't used either. This was not quite as bad
as using a value already freed, but still bad.

Fix #17800, #17809, #17835
2022-01-07 03:17:07 +00:00
Dario Lombardo acc0260c84 tcp: add syn cookie support.
Fix: #17082.
2022-01-06 22:34:30 +00:00
Alexis La Goutte 95ef3a2d45 bpsec: fix warning about -Wprototypes (proto_register/reg_handoff_bpsec 2022-01-06 20:03:11 +00:00
Alexis La Goutte 22de61a063 bpsec: fix -Wdocumentation warnings 2022-01-06 20:03:11 +00:00
John Thacker bf643c2649 SABP: Update ASN.1 template
Update the SABP ASN.1 template file for the changes made by commit
dec5590b5b so they aren't lost.
2022-01-06 14:28:20 +00:00
John Thacker bc9e8ea5b3 MPEG PES: Update conformance file for unify PES header bit fields
Update the conformance file for MPEG PES to produce the changes of
commit 5573d3c4e8
2022-01-06 09:12:55 -05:00
John Keeping e9900c38c2 usb: dissect other speed config descriptors
Other speed config descriptors are identical to config descriptors, it's
just the request that is different.  Handle this request so that other
speed config responses are decoded.
2022-01-06 11:59:53 +00:00
Uli Heilmeier b587d6a266 BGP: Fix next_hop decoding
Related to wireshark/wireshark#17836
2022-01-06 11:12:30 +01:00
Matthew Weant 29324f9409 EAP: Fix dissection of encrypted IMSI identifiers 2022-01-06 07:27:46 +00:00
Roman Volkov 5573d3c4e8 mpeg pes: unify PES header bit fields displaying
Add a bit-mask for 'scrambling-control' field to add a displaying of
bits occupied by the field.
2022-01-06 04:03:55 +00:00
Roman Volkov 59012e34df mpeg descriptor: add Partial Transport Stream Descriptor (0x63) 2022-01-06 03:49:06 +00:00
Dr. Lars Völker 4d9f29150e Signal-PDU: Adding support for zero-terminated and UTF strings
This patch adds support for zero-terminated strings as well as UTF-8 and
UTF-16 strings.

This patch also fixes a check for the signal list UAT (scaler, offset).
2022-01-06 03:17:05 +00:00
Pascal Quantin adca11dd5c range_string: follow-up of 893290c 2022-01-05 20:34:15 +00:00
Martin Mathieson f1c31deb61 UDS: make a function static 2022-01-05 20:15:16 +00:00
Dr. Lars Völker 9b43910bc2 PTP: Source Code Cleanup (formatting) 2022-01-05 17:40:32 +00:00
Dr. Lars Völker 0f2cf2b331 Signal-PDU: reformatting for consistency
The code was not formatted consistently. This patch cleans this up.
2022-01-05 13:06:59 +01:00
Benedikt Heumüller 893290c603 Extended range_string to 64 bit 2022-01-05 09:14:46 +00:00
Dr. Lars Völker 382fe23aa8 UDS: add subdissector support
Adding subdissector support to UDS and allow Signal PDUs for it.

This patch supports:
- ReadDataByIdentifier (RDBI) Reply
- WriteDataByIdentifier (WDBI) Request
- RoutineControl (RC) Request
- RoutineControl (RC) Reply
2022-01-05 06:06:33 +00:00
Guy Harris ec0aaf1811 ftype-time: check for NULL from gmtime() and localtime().
On Windows, they return NULL for times prior to the Epoch.
2022-01-04 15:35:18 -08:00
Roman Volkov 0a4f3d62e5 mpeg table: implement Selection Information Table (SIT) 2022-01-04 20:13:09 +02:00
Luca Deri 39df51c46d Added missing nDPI ClassifierId
For more information about classification engine ids see:
https://www.iana.org/assignments/ipfix/ipfix.xhtml#classification-engine-ids
2022-01-04 13:57:14 +00:00
Roman Volkov 4ce03e2be2 mpeg descriptor: add multilingual ones (5B,5C,5D,5E)
Add Multilingual Network Name Descriptor (0x5B),
Multilingual Bouquet Name Descriptor (0x5C),
Multilingual Service Name Descriptor (0x5D),
Multilingual Component Descriptor (0x5E).
2022-01-04 13:26:22 +00:00
Dr. Lars Völker 99056c2d9e Signal-PDU: Fix extraneous parentheses warnings 2022-01-04 13:28:55 +01:00
Roman Volkov 699dc583bd mpeg descriptor: add NorDig Logical Channel Descriptor v1 and v2
Add as a usual DVB descriptors. A specification was taken from
NorDig Unified Requirements 3.1.2.
Formally, private descriptors have to be used after Private Data
Specifier (0x5F) but DVB operators often ignore this rule. So I
didn't limit the descriptors parsing by Nordig private data
specifier (0x00000029).
2022-01-04 11:53:19 +00:00
Martin Mathieson 10ffdcb3c0 Some (trivial) cppcheck fixes. 2022-01-04 10:48:22 +00:00