Commit Graph

82102 Commits

Author SHA1 Message Date
João Valverde eba84d06e4 docs: Fix fatal log level description 2021-09-25 17:45:33 +01:00
John Thacker 1c3da46bf8 H265: Handle too large Exponential-Golomb coded values
We only allow exp-Golomb coded values to be as large as 32 bit
integers. When packets encode too large a value (invalid content),
clamp the value and report it as malformed with an expert info,
reporting the number of bits consumed (which will probably lead to
a BoundsError later in the packet.)

The case with 32 leading zeroes is a special case because for both
unsigned and signed interpretation there is one non overflowing value.

This is better than using DISSECTOR_ASSERT for invalid packet content.
Avoid left shifting a 32 bit integer by 32, which is undefined.

Use DISSECTOR_ASSERT_FIELD_TYPE at the beginning of the function rather
than using DISSECTOR_ASSERT in the middle, since it's more descriptive
in its error message and clearer code to do it at the start.

Same issue as #17612, commit a7dfe53488.
2021-09-25 08:15:24 -04:00
John Thacker a7dfe53488 H264: Handle too large Exponential-Golomb coded values
Special case the situation with 32 leading zeroes, since in C it's
undefined to left shift a 32 bit integer by 32. Only one value with
32 leading zeroes is an encoded 32 bit integer.

Clamp too large values to G_MAX[U]INT32 and report it as a malformed
expert info. Also report the supposed amount of bits consumed,
which will probably lead to a BoundsError down the line (possibly
not for some bit errors).

This is better than using DISSECTOR_ASSERT for invalid packet content.

Use DISSECTOR_ASSERT_FIELD_TYPE for doing the checks on the hf_field
types, since it's more descriptive in its error message.

Fix #17612.
2021-09-24 17:35:35 -04:00
Роман Донченко 05512b0428 jpeg: correct the IFD tag for the Copyright field
It is supposed to be 0x8298 according to both the TIFF and Exif specs.
2021-09-24 20:32:29 +03:00
Роман Донченко 1848fa71ed jpeg: fix typos in variable names
IFD is the structure these variables refer to, and is short for
Image File Directory.
2021-09-24 17:46:20 +03:00
Роман Донченко 141e3b331f jpeg: place each IFD in a subtree
An Exif file typically contains 2 IFDs, and this makes them easier to tell
apart.
2021-09-24 12:04:03 +00:00
João Valverde b6e80d9a2f CMake: The minizip URL is ancient
Use something a bit more modern instead.
2021-09-24 09:41:57 +00:00
Roland Knall 0c7d82d8b7 USBDump: Fix Memleak with error info
The memory block the error was written to was uninitialized
2021-09-24 06:57:28 +00:00
Uli Heilmeier f18ee30a3d TLS: Adding JA3 and JA3S fingerprints
Generating and calculating JA3 and JA3S based on Client Hello and Server Hello
values to fingerprint TLS clients and servers.

JA3(S) is documented at https://github.com/salesforce/ja3

Fixes: wireshark/wireshark#17595
2021-09-24 06:10:11 +00:00
Martin Mathieson b84aa6b243 Fix some spelling errors. 2021-09-23 21:22:46 +00:00
Gerald Combs da817af974 Docs: More POD markup cleanup. 2021-09-23 13:35:05 -07:00
João Valverde f4c283298f Add compatibility fix for Minizip dependency 2021-09-23 14:19:02 +00:00
Uli Heilmeier f827daba24 SSH: Fix missing g_free() 2021-09-23 11:34:07 +00:00
João Valverde 443f05bc92 Windows: Fix build without libpcap
wireshark\capture\capture-wpcap.c:901:42: error: expected ';', ',' or ')' before '_U_'
 get_runtime_caplibs_version(GString *str _U_)
                                          ^~~
2021-09-23 12:17:20 +01:00
Guy Harris 624ed977cb validate-clang-check: add yet another Windows-only file. 2021-09-23 03:39:11 -07:00
Gerald Combs 9d10838314 Docs: Clean up wireshark.pod markup.
Clean up some list items and a quote.
2021-09-23 07:02:36 +00:00
Gerald Combs 0b567bb27e Docs: Asciidoctor.js isn't yet suitable for our needs.
Reverse the text added in cdd6f2ec80 and note that we can't yet use
Asciidoctor.js to build our documentation. I'm not sure how I managed to
miss this in my initial tests, but Asciidoctor.js is missing Docbook,
PDF, and EPUB backends, and doesn't support Ruby macros.
2021-09-23 06:40:08 +00:00
John Thacker 07330b392e documentation: update PDML/PSML doc
Provide Internet Archive links for dead URLs.
Update to note that PSML output is supported by tshark and not
a future feature (true since 17 years ago, when it was still tethereal).
Note "fake-field-wrapper" protocol for top level fields (including data,
which is converted from a protocol to a field for PDML).
Note "_ws.expert" protocol replaced by field, as with data.
Note that some dissectors place subdissected protocols in subtrees
instead of at the top level, and that this is _not_ changed, violating
the PDML spec.
Fix #10588.
2021-09-22 21:19:55 -04:00
João Valverde 3adfca384b MinGW-w64: Fix extcap build output path
Build output must not be placed in run/<config>/subdir.

This should be done using CMAKE_GENERATOR_IS_MULTI_CONFIG instead of just
MSVC but that wasn't working for me when I tried briefly.
2021-09-22 16:34:37 +00:00
João Valverde fa525649be CMake: Try to set a required try_run() definition in a more idiomatic way
This is applicable to every test (if we had more), not just HAVE_C99_VSNPRINTF.

Could also be a #define but let's go with this for now. This takes
advantage of the stack based design of CMakePushCheckState.
2021-09-22 16:34:37 +00:00
Constantine Gavrilov 9bce34ca67 NVMe: decode Async Event Req CQE. 2021-09-22 16:01:55 +00:00
João Valverde 9f9afc0e86 CMake: Remove an unnecessary version check
MINGW implies WIN32 which implies CMake >= 3.13.

Follow-up to 1dad8190b1.
2021-09-22 16:43:09 +01:00
João Valverde 6921f01250 MinGW-w64: Need to use ANSI C stdio
Defining _POSIX enables __USE_MINGW_ANSI_STDIO, this switches the
stdio API from Microsoft to MinGW internal (ANSI C).
2021-09-22 14:37:13 +01:00
João Valverde 8d59f81729 MinGW-w64: Replace incompatible format for strftime()
Replace %F and %T in the format string. These specifiers are just
short-hand so just write them in full.
2021-09-22 14:28:49 +01:00
João Valverde c4265865c2 MinGW-w64: Fix windeployqt errors
--debug and --release flags are unnecessary and trigger errors.

--pdb not supported and triggers a warning.
2021-09-22 14:28:49 +01:00
João Valverde c4d5eea33e CMake: Target platform for WIN32 needs to be lower case
Capitalization matters here. We are now accepting this value from the
environment so we need to lower case that string.

Add an extra sanity check and status message for target CPU architecture
to help detect mismatches.
2021-09-22 14:21:20 +01:00
John Thacker a22aa677ad SDP: Handle fmpt:ipdc-ksm and fmpt:ipdc-kmm
ETSI IP Datacast is another protocol that uses strings instead
of numeric payload types after the fmpt attribute. (ETSI TS 102 472,
ETSI TS 102 592). Since we're up to five special case strings to
check for, refactor the code a bit.
2021-09-22 12:26:17 +00:00
João Valverde 5de2b55663 CMake: Check if vsnprinf() is C99-compliant 2021-09-22 12:10:27 +00:00
John Thacker a2120e823c dfilter: Allow generic unquoted strings that are protocol names on RHS
Protocol names can only be on the left hand side of filter expressions.
Commit ac0b1d42f3 (merge !4214) caused
unquoted strings that could be interpreted as either protocol names or
byte arrays to be parsed as the latter when on the RHS.  Further
relax by allowing unquoted strings on the RHS that can be interpreted as
protocol names to be treated as any generic unquoted string. (The
semantic checker will still prefer interpreting the string as a byte
array, if possible, to a generic string.)

This is useful for filter expressions of the sort "frame contains data",
where data should be interpreted as "data", i.e. "\x64\x61\x74\x61".
Long run this ideally should be fixed earlier, at the lex parser or
grammar checker.
2021-09-22 11:22:14 +00:00
João Valverde 1dad8190b1 CMake: Fix minimum version requirements for CentOS 8
target_link_options() requires CMake >= 3.13.
2021-09-22 10:46:20 +00:00
Martin Mathieson fee630dbdc Fix the lengths of some masks. 2021-09-22 09:38:09 +01:00
Alexis La Goutte 3e193b376f GitLab CI: Add HTML output for Clang Analyzer Check artifact 2021-09-22 04:44:28 +00:00
Alexis La Goutte 6c0897393b GitLab CI: remove ANSI color when generate Clang Check Analyzer text log 2021-09-22 04:44:28 +00:00
Pau Espin 07b0c4e78a GSM A-bis/OML: Fix false positive on expert notification for ABIS_OM_MDISC_MANUF
As per TS 12.21 section 8.1.4 "Manufacturer-Defined O&M messages",
NOTE 1:
"""
The Length Indicator gives the length of the Manufacturer-defined O&M data field in the message
segment being transported which is less than or equal to 255 octet.
"""

Where the "Manufacturer-defined O&M data field" is the content AFTER the
"ManId Length Indicator" + "Manuf. Identifier" as can be seen in the
table of the same section.

This fix was tested against osmo-bts, which implements the ipaccess
manufacturer extensions.
2021-09-21 19:16:49 +00:00
Stig Bjørlykke 533d859499 Qt: Register import_hexdump.json as a profile file
Profile files which is only used in Qt is not automatically registered
during startup and must be explicit registered.

Add profile_register_persconffile() to handle this registration.
2021-09-21 18:20:34 +00:00
João Valverde 0c735dcf0a MinGW-w64: Disable building 'etwdump' 2021-09-21 14:52:32 +00:00
João Valverde d09651e637 CMake: 'libui' depends on wiretap 2021-09-21 14:52:32 +00:00
João Valverde dfd241cef5 CMake: 'version_info' depends on wsutil 2021-09-21 14:52:32 +00:00
João Valverde 0d6f0a4213 MinGW-w64: Add guards for MSVC macro definitions
Add a comment too.
2021-09-21 14:52:32 +00:00
João Valverde b2691b8f6c file_util: Fix declaration is not a prototype [-Wstrict-prototypes] 2021-09-21 14:52:32 +00:00
João Valverde a5a9bb0763 CMake: Move UNICODE defines to command line
For consistency's sake, I have not had any build errors that can
be attributed to this.
2021-09-21 14:52:32 +00:00
João Valverde 6bd1bb4d7c MinGW-w64: Define NOMINMAX for Windows API
This seems relevant to MinGW-w64 from a quick look at the source.
2021-09-21 14:52:32 +00:00
Piotr Winiarczyk bf55ff9b47 btmesh: Add mesh models lighting opcodes dissector
Add all mesh models lighting opcodes dissector (chapter 6 of Mesh Models document). Closes #17578.
2021-09-21 14:07:06 +00:00
Taisuke Sasaki b9687f7d85 BGP: Add BGP-LS BGP Egress Peer Engineering (rfc9086) 2021-09-21 13:32:20 +00:00
Developer Alexander 7866f43d82 IO Graph: Add checkbox to prevent automatic rescans
Adds a checkbox 'Automatic Update' to the IO Graph to enable or disable
rescans and recalculation of graph data temporarily. This is useful when
you want to modify settings of multiple graphs without triggering a rescan
with every change of a single setting. This becomes useful for large trace
files in particular.

Rescan or recalculation events are queued while 'Automatic Update' is not
active. Checking 'Automatic Update' triggers the queued updates.

The setting for 'Automatic Update' is stored in a preference.

A german translation for 'Automatic Update' is included.
2021-09-21 12:58:55 +00:00
Martin Mathieson 543ea3968c ethercat: Fix some too-wide mask widths.
N.B. Some other issues spotted have been reported in
https://gitlab.com/wireshark/wireshark/~/issues/17605
2021-09-21 11:04:31 +01:00
João Valverde b12644b629 MinGW-w64: Need to define WIN32_LEAN_AND_MEAN 2021-09-21 05:56:34 +00:00
João Valverde 50fdfda316 MinGW-w64: Need to link using -municode
Some targets are not using unicode/WinMain (not sure why), so this
really needs to be a per target setting (better anyway).
2021-09-21 05:56:34 +00:00
João Valverde 3164d4a646 MinGW-w64: Use clock_gettime()
Mingw-w64 has this function. We may have to define some extra symbols
for API visibility but on my system the config check is working out
of the box.

POSIX systems come in many flavours, remove the "save time" if()
condition in this case.

Fix code to check if we have clock_gettime() on Windows as well.
2021-09-21 05:56:34 +00:00
João Valverde 2f7e3f1d82 MinGW-w64: No need to define 'ssize_t'
This will trigger a collision on MinGW-w64.

Define this instead for Microsoft's compiler.

We should probably have a compile time check instead.
2021-09-21 05:56:34 +00:00