Commit Graph

79277 Commits

Author SHA1 Message Date
Gerald Combs 4a5dece155 [Automatic update for 2021-05-16]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-16 09:53:30 +00:00
Gerald Combs 5254d5e822 Tools: Try to exit more gracefully from fuzzing.
If we catch a signal while we're fuzzing, exit with a successful status
and clean up after ourselves.


(cherry picked from commit dacbfc4ae9)
2021-05-11 18:23:15 +00:00
Gerald Combs b45185f1c0 [Automatic update for 2021-05-09]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-09 09:53:41 +00:00
Gerald Combs 28aecbba66 GitLab CI: Set our Clang version. 2021-05-08 09:30:33 -07:00
Gerald Combs 728ae2de5f GitLab CI: Fix our fuzzing resource group. 2021-05-07 17:09:42 -07:00
Gerald Combs 2410d8b6eb GitLab CI: Add fuzzing to the 3.4 branch.
Backport part of d7bdd77a4c, which adds a -t option to
tools/fuzz-test.sh which lets you specify a maximum fuzz time.

Copy over the current (as of 7c6df3848f) fuzz jobs from the master
branch.
2021-05-07 14:09:10 -07:00
Gerald Combs 66cba93e39 GitLab CI: Give our jobs proper names.
GitLab's job YAML parser allows spaces in key names and our jobs are
visible in the web UI, so give them proper names.
2021-05-07 20:11:37 +00:00
Gerald Combs c1cf92283c GitLab CI: Restore the ability to run pipelines from the web UI.
(cherry picked from commit bedf0eb21c)
2021-05-07 19:26:51 +00:00
Gerald Combs 219978c50d GitLab CI: Miscellaneous updates.
Copy over various updates from the master branch including:

- Setting a git clone depth.
- Running manually in forks.
- Rule reuse.
- Using "extends" instead of YAML anchors.
2021-05-04 15:56:16 -07:00
Gerald Combs b191395e0e [Automatic update for 2021-05-02]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-02 09:36:02 +00:00
Guy Harris 347f60c37b tap_export_pdu: we don't have packet flags, don't claim that we do.
We don't set rec.rec_header.packet_header.pack_flags, so don't set
WTAP_HAS_PACK_FLAGS in the presence flags.  (Copy-and-pasteo?)


(cherry picked from commit faf2e62db8)
2021-04-29 21:55:16 +00:00
Uli Heilmeier ab13858b7f PTP: Check for enough bytes
Make sure we have enough bytes for Length and Type fields before we read
from tvb.
Using existing msg_len for the checks.

Closes: wireshark/wireshark#17355


(cherry picked from commit fd14396972)
2021-04-26 14:11:04 +00:00
Gerald Combs aa169ab224 [Automatic update for 2021-04-25]
Update manuf, services enterprise numbers, translations, and other items.
2021-04-25 09:52:21 +00:00
Gerald Combs 31a3ec04a8 Version: 3.4.5 → 3.4.6.
[skip ci]
2021-04-21 11:56:15 -07:00
Gerald Combs 7db1feb42c Build: 3.4.5
[skip ci]
2021-04-21 10:14:36 -07:00
Gerald Combs 6548abd191 Prep for 3.4.5. 2021-04-20 11:21:00 -07:00
Gerald Combs 04f9d3e097 MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331.


(cherry picked from commit b7a0650e06)
2021-04-20 16:05:59 +00:00
Gerald Combs 19d03ef4ac CMake: Enable AUTO{MOC,UIC,RCC} according to our CMake version.
As noted in be2b0fc810, we need to set CMAKE_AUTO* before searching for
Qt packages when using 3.20.0 and later. However, this fails if we're
using CMake 3.9.6 or earlier. Set CMAKE_AUTO* where needed depending on
our CMake version.

Ping #17314.

(cherry picked from commit a80ea46ff7)

Conflicts:
	ui/qt/CMakeLists.txt
2021-04-19 12:27:02 -07:00
naf eee907aeb5 QT ByteViewText: calculate string widths consistently to prevent clipping
For QT >5.11, stringWidth() uses horizontalAdvance, which gives different
(longer) widths than the old boundingRect().width() method.

Other locations use the boundRect().width() method directly, resulting
in underestimating line widths and clipping the last characters in
the byte view window.

Fix by forcing all width calculations to use stringWidth().
Closes #17087.

(cherry picked from commit 95f3d1b075)

Conflicts:
	ui/qt/widgets/byte_view_text.cpp
2021-04-19 20:08:17 +02:00
Gerald Combs cc954fae7e [Automatic update for 2021-04-18]
Update manuf, services enterprise numbers, translations, and other items.
2021-04-18 09:52:11 +00:00
Stefan Metzmacher e49430b4d3 packet-ldap: fix regression for SASL handling
commit 19b3376a24
("LDAP bogus malformed errors: decoding encrypted data")
introduced 2 problems:

- guint decr_len = tvb_reported_length(decr_tvb); was
  always called with decr_tvb==NULL

- dissect_ldap_payload() was not called if sasl_tree is NULL,
  it needs to be called even if the tree pointer are NULL
  in order to have the COL_INFO setup correctly.

I guess this should also be backported to stable branches
(together with 2e6d3b571b
 "LDAP: SASL Buffer doesn't include Length field")

https://gitlab.com/wireshark/wireshark/-/issues/17347

Signed-off-by: Stefan Metzmacher <metze@samba.org>


(cherry picked from commit 1d623fd541)
2021-04-16 11:53:00 +00:00
Uli Heilmeier 0c1743656f 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


(cherry picked from commit 2e6d3b571b)
2021-04-16 11:03:16 +00:00
Simon Holesch d28ded7244 ptvcursor: Fix crash with deeply nested subtrees
If the proto tree is more than 8 levels deep, the subtree_lvl array
length is extended, by allocating a new area and copying everything into
that new area. However the old array length wasn't calculated correctly,
so only part of the subtree_lvl array was copied, causing a crash after
two ptvcursor_pop_subtree() calls.


(cherry picked from commit fa483ac191)
2021-04-16 07:44:56 +00:00
Michael Tuexen 489fc40a49 Fix conversation table when using epoch based time
Ensure that if using tshark -q -t e -z conv,tcp the reported
start time is relative to the epoch time and not relative to
the time of the first packet in the capture file.

Thanks to Theresa Enghardt for reporting the issue and to
Peter Lei for initialy looking into it.

(cherry picked from commit f099bd179a)
2021-04-15 14:27:02 +02:00
Gerald Combs cb432b878e [Automatic update for 2021-04-11]
Update manuf, services enterprise numbers, translations, and other items.
2021-04-11 09:53:17 +00:00
Guy Harris cdca1f2d03 pcapng: expand a comment and tweak the version test.
Drop in the comment from libpcap about version 1.2 (I wrote that
comment, and generously double-license it under the BSD license and the
GPL :-)).

Redo the version test as

    if (!({version is one we handle}))

to match the way it's done in libpcap.


(cherry picked from commit 7de6b0822a)
2021-04-09 06:31:05 +00:00
Loris Degioanni 716dd09605 sysdig: a couple more fixes
- parse the number of system call arguments in a way that works for both V1 and V2 event blocks
- returned the correct error string when unable to read the nparams entry from a sysdig event block V2

(cherry picked from commit 7894b1d0ea)
2021-04-08 22:09:56 -07:00
Loris Degioanni 4e7df5af01 sysdig: implementation fixes
- make sure nparams is initialized
- validate block_total_length in the correct way for sysdig event blocks

(cherry picked from commit cbbe660504)
2021-04-08 22:08:04 -07:00
Loris Degioanni 180c96beb8 sysdig: simplified the separate handling of the two different sysdig block types
(cherry picked from commit 8c70dd8d17)
2021-04-08 22:05:47 -07:00
Loris Degioanni e94d9f4549 sysdig: support the most recent version of sysdig
Update the pcap-ng reader and sysdig event dissector to support the second version of the sysdig event block, which was introduced after Wireshark's original implementation

(cherry picked from commit fbe8d3a00f)
2021-04-08 21:58:20 -07:00
Gerald Combs 1be17e2d30 GitLab CI: Switch to our new Windows runner.
(cherry picked from commit 85b36ef4b6)
2021-04-04 22:53:46 +00:00
David Perry f1677bd31c maxmind: add optional synchronous lookups
When tshark enables synchronous resolution of IP addresses to names,
forces calls to maxmind_db_lookup_ipv4()/_ipv6() to block-wait for the
maxmind response.

Proposed fix for #14691.

(backported from commit c0abaa06f7)
2021-04-04 02:16:48 -07:00
Vahap Emin Agaogullari 3e35fecccb PROFINET: Multiple write in record dissection
COContainerContent dissects PDInterfaceMrpDataAdjust and
PDInterfaceMrpDataAdjust dissects remaining COContainerContent
because of offset problem. Offset problem is fixed.

(cherry picked from commit ccec04ede0591a5e83d2664c26ed5cb4481a6809)
(cherry picked from commit ecbe04e0bbc6634eaa6c54968870fee61760107c)
2021-03-31 17:22:27 +00:00
Guy Harris 4a7ddb6b1a 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.


(cherry picked from commit 2ba52cdc0e)
2021-03-29 01:20:38 +00:00
Gerald Combs 636f7f1c09 [Automatic update for 2021-03-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-28 09:54:39 +00:00
Guy Harris 193b1fc545 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.


(cherry picked from commit cda18f951e)
2021-03-28 03:01:34 +00:00
Gerald Combs 6ef6e8f607 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.

(cherry picked from commit be2b0fc810)

 Conflicts:
	ui/qt/CMakeLists.txt
2021-03-26 14:50:21 -07:00
Nardi Ivan 3bca4e3b3f SMB2: fix two memory leaks
* Since c3342930 we don't free anymore the entries in the files hashtables.
The cleanest solution is probably to convert these hashtables into two
wmem_map_t structures and let the wmem core handling any cleanup.

* b0f5b2c174 added supported for chained compression; the uncompressed
tvb must be freed


(cherry picked from commit e677a909e1)
2021-03-25 16:01:01 +00:00
Uli Heilmeier 6b072b63f0 DNS: Fix pointer for is_multiple_responses
As discussed in wireshark/wireshark!2497 there is no need
for a pointer to a pointer.


(cherry picked from commit 337bdf8eb3)
2021-03-23 15:35:55 +00:00
Uli Heilmeier 06e20df535 DNS: IXFR/AXFR queries with multiple responses
IXFR and AXFR queries can have multiple DNS responses. As all responses
belong to one transaction, they have the same transaction ID.

We shouldn't handle them as retransmits.

Fix: wireshark/wireshark#17293
(cherry picked from commit 07fb47111e)
2021-03-23 11:49:13 +00:00
Guy Harris 878e8058a6 Do the LFS checks before processing any subdirectories.
That's necessary in order to make sure that the required -D flags show
up when building code from all subdirectories.

(cherry picked from commit 3f556a6e76)
2021-03-22 19:39:50 -07:00
Guy Harris d0fdecc6b6 Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.

(cherry picked from commit 0cc59d38ab)
2021-03-22 12:38:48 -07:00
Gerald Combs 76f01ea726 [Automatic update for 2021-03-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-21 09:57:41 +00:00
Darius Davis b2d8858b9a Minor doc cleanups.
Here's a grab bag of trivial cleanup to the documentation.  This change:

- Cleans up some comments in the asciidoctor macros which are no longer
  accurate (and do not appear in the build products anyway).

- Fixes a missing space in the text "Wireshark Q&A" in the release notes.

- Allows the "docbook" backend to produce hyperlinks too... That seems to be
  necessary if we want to start using our custom link macros in WSDG, which
  seems like a reasonable thing to do.  And fixes up a wrong variable name in
  the handling of the case where we are not able to produce a hyperlink.


(cherry picked from commit 4c513fb4ab)
2021-03-20 17:31:42 +00:00
Guy Harris f63d93957d caputils: pull the includes out of extern "C" { ... }.
Have separate #ifdef HAVE_LIBPCAP ... #endif sections for the includes
and the definitions/declarations.

(There are no good solutions that don't require hopping in a time
machine and changing history.)


(cherry picked from commit 5a4cb7ce33)
2021-03-18 04:52:55 +00:00
Guy Harris fcefe78a67 caputils: get rid of the extern "C" { idiom.
Instead, declare each function with EXTERN_C, #defined as extern "C" in
C++ and just extern in C.

This avoids all the thrashing to try to keep headers outside extern "C"
{ by the simple expedient of not *having* extern "C" {.


(cherry picked from commit 4584b9d1d3)
2021-03-17 23:15:57 +00:00
Dario Lombardo 2974b30150 caputils: fix compilation without pcap.
The extern declaration must be put outside the ifdef to match the
closing statement as well as surrounding al the functions.

Fixes: 2820156fbd (Move still *more* headers outside of extern "C".)


(cherry picked from commit 9ca121bcf8)
2021-03-17 22:45:12 +00:00
Guy Harris 95c7c1c0f2 kerberos: regenerate packet-kerberos.h.
We updated the template; regenerate the header.


(cherry picked from commit 7efb2120bc)
2021-03-16 22:42:49 +00:00
Guy Harris b5d65c0074 Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".

(cherry picked from commit 2820156fbd)
2021-03-16 15:03:17 -07:00
Guy Harris 0b8c953533 Move even more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".

(cherry picked from commit e434d404d0)
2021-03-16 11:35:00 -07:00