Commit Graph

80322 Commits

Author SHA1 Message Date
Guy Harris 2ba52cdc0e tvbuff_subset: fix its implementation of string scanning.
Both subset_find_guint8() and subset_pbrk_guint8() pass the parent
tvbuff to tvb_find_guint8()/tvb_ws_mempbrk_pattern_guint8(), along with
the offset in that tvbuff.

That means that the offset they get back is relative to that tvbuff, so
it must be adjusted to be relative to the tvbuff *they* were handed.

For subsets of frame and "real data" tvbuffs, there's a single lump of
data containing the content of the subset tvbuff, so they go through the
"fast path" and get the offset correct, bypassing the broken code;
that's the vast majority of calls to those routines.

For subsets of *composite* tvbuffs, however, they don't go through the
"fast path", and this bug shows up.

This causes both crashes and misdissection of HTTP if the link-layer is
PPP with Van Jacobson compression, as the decompression uses composite
tvbuffs.

Fixes #17254 and its many soon-to-be-duplicates.
2021-03-29 01:02:47 +00:00
João Valverde 22cf2cb345 CMake: Set CMake Policy CMP0071 to NEW
This policy says: "Since version 3.10, CMake processes regular and GENERATED
source files in AUTOMOC and AUTOUIC. In earlier CMake versions, only regular
source files were processed. GENERATED source files were ignored silently."

We are currently running AUTOMOC/RCC/UIC on too many files unnecessarily and
that should be improved. CMake 3.20 introduced some changes related with this
that broke the build (issue #17314) and need further investigation.

Meanwhile setting this policy to NEW shouldn't break anything and silences
some noisy CMake warnings.
2021-03-29 01:33:39 +01:00
João Valverde d7401147b4 CMake: Remove non existent '/codecs' include path
The '/codecs' dir was removed in g63af1da7e7.

Avoid using include_directories(), prefer target_include_directories().
Remove some unnecessary CMAKE_CURRENT_*_DIR includes and some other
small cleanups while at it.
2021-03-29 00:00:57 +00:00
João Valverde 0fd2033ba2 plugin_ifdemo: Add missing QtMultimedia dependency
On my system I had to add a QtMultimedia dependency to get this plugin
to build.
2021-03-29 00:00:57 +00:00
Preston Hunt 5595cfb3e5 IEEE 802.11: Add dissection of PASN Parameters
Adds dissection of the Pre-Association Security Negotiation (PASN)
Parameters element.
2021-03-28 07:21:00 -07:00
Preston Hunt 00bf70e446 IEEE 802.11: add AKMs 19 and 20
Adds 19, FT using PSK (SHA384), and 20, PSK (SHA384), both defined in
802.11-2020.
2021-03-28 11:23:44 +00:00
Gerald Combs cc3ee84516 [Automatic update for 2021-03-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-28 09:30:09 +00:00
Martin Mathieson eaf6554aa1 ISIS-LSP: Fix length of a field.
SID/Label Binding TLV Range field is 2 bytes.
2021-03-28 06:05:15 +00:00
Guy Harris cda18f951e wslua_tvb: correctly trim off the end of a tvbuff.
The length specified in a TvbRange is the *actual packet length*, not
the *sliced-to* length, so use tvb_new_subset_length() to cut it short.

This fixes the fix for #15655, and addresses at least some of the issues
in #17255.
2021-03-27 19:31:37 -07:00
Guy Harris 2b9a6ee592 text_import: just suppress the two-initializers warning.
Stick with the simpler "init everything to invalid, and then override
that" mechanism, and just turn off the warning for thse structures.
2021-03-27 14:00:44 -07:00
Guy Harris fd39930f40 text_import: don't initialize array elements twice.
Some compilers warn about it with -Winitializer-overrides, and default
to setting that.
2021-03-27 12:35:01 -07:00
Tomasz Moń 5bbfee2ed8 protobuf: fix leaking tokens
Move scanner destroy call to pbl_clear_state() so it is freed if
parsing fails.

This eliminates most of leaked memory reported in #17305.
2021-03-27 17:23:07 +00:00
Jirka Novak 1c59f7d9ac RTP Player: Decoding of audio improved
Changes:
In nearly all cases decoding match content of capture. The exception is #2270,
where timestamps do not match recorded time which causes discrepancy in
decoding.
Decoding of audio correctly follows different soundcard rates.
RTP Player shows first sample rate in each stream in place of rate of playing.
Fixed incorrect time axis calculation

Fixes #16837
Fixes #4960
Fixes #2270
2021-03-27 12:12:43 +00:00
Jirka Novak e75e1fb580 Follow SIP Call: Added Follow SIP Call to Follow menu
Changes:
- epan/follow.c: follow_conv_filter_func has new parameter
  epan_dissect_t *edt, so filter can be generated based on decoded tree
of packet below the cursor
- menu Follow/SIP Call is enabled when sip packet is selected
- value of sip.Call-ID is used as filter for SIP call
- for sharkd it generates filter just 'sip.Call-ID' with no value
2021-03-27 09:02:14 +00:00
Jirka Novak cd5b568233 RTP Player: Showing of setup frame for RTP stream fixed
When RTP stream has no setup frame, but is decoded by Decode as or
with rtp_udp active, setup frame was shown as SETUP <number>, but
correct is RTP <number>.
2021-03-27 08:45:22 +00:00
Guy Harris 828b43491c macos-setup: the current Python is 3.9.2.
While we're at it, capitalize "Arm".  (That's how Arm Ltd. is spelling
it now, even in the architecture versions, e.g. "Armv8-A".)
2021-03-26 21:32:31 -07:00
Gerald Combs be2b0fc810 CMake: Enable AUTO{MOC,UIC,RCC} earlier.
Enable CMAKE_AUTOMOC, CMAKE_AUTOUIC, and CMAKE_AUTORCC before searching
for Qt packages. This is apparently required for CMake 3.20.0 and later.
Fixes #17314.
2021-03-26 20:48:22 +00:00
Guy Harris 6da96eeb2a capture_opts: always initialize ifname to null.
Fixes #17318.
2021-03-26 13:04:36 -07:00
Tomasz Moń 525006f97b protobuf: free memory used by scanner after parsing
Closes #17305
2021-03-26 15:47:28 +01:00
Tomasz Moń 98cf147b19 glib-compat: Fix build on Windows
Include string.h to make the memcpy() function available.
2021-03-26 09:52:56 +01:00
Daniel Dulaney 62af671bf3 Lua: add DissectorTable.try_heuristics() function
Add DissectorTable.try_heuristics(name, tvb, pinfo, tree). Previously,
there was no way for a Lua plugin to run an existing heuristic
dissector.

Based on Gerrit change 18718. Closes #17220.
2021-03-26 07:15:16 +00:00
Paul Weiß 537c5f2955 Regex text imoprt: MSVC compiling and updated timestamps
replaced [min ... max] = val initiallizers with a macro expansion
removed __attibute__
updated timestamps to march
2021-03-26 06:44:25 +00:00
Paul Weiß b0289c5aaf Regex text import: fixed ui deviations
disabled RichText in regex text input, to prevent invisible
formatting from getting passed to the regex engine
fixed a issue where fields matched by duplicate groups would
not be parsed
2021-03-26 06:44:25 +00:00
Paul Weiß afd1bb0381 Regex based import: documentation and release notes
Added documentation on the Regular Expression import mode
Added documentation for the associated ui-fields
Updated the screenshot for the import-from-hexdump dialog
Added a screenshot of the Regular expression mode tab
Updated the documentation for the updated Timestamp format
Added an entry in the release notes about this new/updated feature
2021-03-26 06:44:25 +00:00
Paul Weiß 8c1b29a597 Regex based textfile import
Modularized the parser backend slightly to have the needed hooks
Modified the timestamp format slightly to enable arbitrary postion for
second fractions
Added a regex based seeking parser for textfiles as frontend alternative
to text_import_scanner.l
Regex is using the GLib implementation
Supported frame-data formats are bin, hex, oct and base64
Regex based importing UI
Fixed Meory-leak in ImportTextDialog::exec()
A new tab was added to the text_import ui to accomodate the new fields
Hints are available and styled accordingly
2021-03-26 06:44:25 +00:00
Joakim Andersson 880edd9009 nordic_ble: Update display name of nordic_ble dissectors
Update display name of the nordic_ble dissector to the release used
by nordic semiconductor for the development tool on the homepage.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-03-25 22:10:11 +00:00
Joerg Mayer 72a6e814bb isis: Support for proprietary Avaya/Extremenetworks Fabric TLVs/NLIPD
- TLV 129 NLPID decoding cleanup with multiple NLPIDs
- NLPID 0x8f added (Avaya proprietary)
- TLV 147 decoding added (Avaya proprietary)
- TLV 184 Avaya prorietary IPVPN decoding added
- TLV Types 185-186 Avaya proprietary IPVPN MC added without decoding
2021-03-25 17:17:25 +01:00
Dario Lombardo f96886ebef
tools: add g_memdup to prohibited APIs. 2021-03-25 15:53:27 +01:00
Eugene Adell 2484ad2f72 TCP: SEQ analysis precedence preference
Introduce a new TCP preference to allow the user to choose the
precedence between Fast Retransmission or Out-Of-Order. When
performing the SEQ analysis, ambiguous packets will be considered
with the chosen priority, helping in the final interpretation.
Closes #15987
2021-03-25 13:29:38 +01:00
Dr. Lars Völker df46a52174 NEW: Dissector for signal PDUs
This patch adds a dissector for PDUs based on signals. On CAN,
FlexRay, etc. data is transported in PDUs that are based on
signals. These signals are typically an arbitrary number of bits.

This dissector allows:
- Parsing configured signals (shortened datatypes too)
- Scaling and moving signals values (compu scale)
- Naming signal values (compu consts)
- Filtering on the scaled and raw value

The dissector supports:
- Signal PDUs over CAN
- Signal PDUs over FlexRay
- Signal PDUs over SOME/IP
- Signal PDUs over PDU-Transport
2021-03-25 10:53:57 +00:00
Martin Mathieson 93e96885c5 GSVP: fix a typo
"interleaving"
2021-03-25 10:26:36 +00:00
Dario Lombardo ea929d6401 wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68,
we provide our own copy of g_memdup2() for older GLib versions.
2021-03-25 09:38:10 +00:00
Dario Lombardo e6df130762 test: add missing raw string regex identifier. 2021-03-25 08:16:10 +00:00
Guy Harris d18e1f19e9 Add dumpcap options to set the name and description for a capture source.
Add --ifname and --ifdescr to allow the name and description for an
interface or pipe to be set; this overrides the specified name or
reported description for an interface, and overrides the pipe path name
and provides a description for a pipe.

Provide those arguments when capturing from an extcap program.

This is mainly for extcaps, so you have something more meaningful than
some random path name as the interface name and something descriptive
for the description.
2021-03-25 07:34:37 +00:00
Roman-Koshelev ecad065809 Add FIND dissector 2021-03-25 07:00:32 +00:00
Stefan Battmer bedd1a8aee gvsp, u3v: GenDC endianess fixes and new pixel formats
- gvsp: Fixed some GenDC container header related endianess bugs
        (flipped bits in dissector)
- gvsp: Added support for GenDC meta-data decoding
- gvsp, u3v: Added support for all newly defined pixel formats
- its: Removed redundant code (possible search and replace error)
2021-03-25 06:45:20 +00:00
Roman-Koshelev 815024346a TFTP: dissect_tftp fix
Now we ignore random packets and also correctly recognize server
responses in cases where the client uses the same port numbers as
the server for its TFTP or other conversations
2021-03-25 06:28:29 +00:00
Roman-Koshelev 0304d5ec27 TFTP: strengthen heuristic for RRQ/WRQ 2021-03-25 06:28:29 +00:00
Roman-Koshelev 5e2080131d TFTP: heuristic fix for RRQ/WRQ
Before that, it worked incorrectly for all valid RRQ/WRQ
2021-03-25 06:28:29 +00:00
João Valverde 291a8b8bc1 Replace g_assert(FALSE) with g_assert_not_reached() 2021-03-24 22:24:37 +00:00
Ranjeet Kumar Singh ebf670692a Protobuf: Allow all protobuf fields to have a plugin dissector 2021-03-24 21:39:01 +00:00
ranjetsih 11f933b446 Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
ranjetsih 387ebc955f Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
Jirka Novak f10ebb959d VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis
dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
2021-03-24 20:02:41 +00:00
Caleb Chiu 4b1dad3f2e USB HID: Removed codes of repeated dissection
For class-specified HID request with data fragment, the original codes perform repeated dissection.
For example, the SET REPORT REQUEST 21 09 02 02 03 00 02 00 02 00 would be dissected as:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    bRequest: 9
    wValue: 0x0202
    wIndex: 3 (0x0003)
    wLength: 2
    Data Fragment: 0200

And dissected as below after the codes removed:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    Data Fragment: 0200
2021-03-24 18:46:45 +00:00
Jirka Novak 2a4859bd14 RTP Player: UI improvements
Changes:
- all waveforms has common scale therefore louder/quiter signal is visible
- when stream/streams are deleted from view, Y axis is rescaled and
  waveforms are rearranged to reuse empty space
2021-03-24 09:23:52 +00:00
Uli Heilmeier 2e6d3b571b LDAP: SASL Buffer doesn't include Length field
SASL Buffer starts after the SASL Buffer Length field. Therefore
we should only mark the bytes without the Length field.

Sample capture can be found in wireshark/wireshark#15128
2021-03-24 08:28:20 +00:00
Uli Heilmeier 337bdf8eb3 DNS: Fix pointer for is_multiple_responses
As discussed in wireshark/wireshark!2497 there is no need
for a pointer to a pointer.
2021-03-23 12:32:42 +01:00
Martin Mathieson 4981b10d0b Add a commit-msg that may be installed to verify commit msg line length. 2021-03-23 09:09:19 +00:00
ranjetsih 5177437f30 "GTP: add option to decode T-PDU Data with a plugin dissector"
As of now GTP dissector provides option to decode T-PDU data ether, async, and with some heuristics.

But there is no option present to decode a new protocol with a plugin.

This change adds an option to decode T-PDU data with a plugin, to help develop and test new protocols that are
encapsulated as GTP T-PDU data.
2021-03-23 08:02:43 +00:00