Commit Graph

82448 Commits

Author SHA1 Message Date
Alexis La Goutte 646e3db99a EAP: Add Autority ID Data from EAP-FAST
4.1.1 Authority ID Data https://datatracker.ietf.org/doc/html/rfc4851#section-4.1.1
2021-10-26 20:15:41 +00:00
Gerald Combs 9104a3744e PNRP: Exit our main loop.
Make sure our main loop offset advances. Fixes #17684.
2021-10-26 10:00:37 -07:00
João Valverde c9abbde287 docs: Update wireshark-filter man page about "!="
Update man page to remove obsolete information about "!=".
2021-10-26 14:53:20 +00:00
Manasa S 10352d552e TZSP: Add support for 6GHz band 2021-10-26 14:20:37 +00:00
Brian Sipos bc01dcb22c WSCBOR: Separate error from non-error expert info
The non-error expert info should not trigger wscbor_skip_if_errors() and similar logic.
2021-10-26 12:46:16 +00:00
Brian Sipos 1120f545d3 CBOR: Avoid infinite loop when sequence has not-well-formed data
This fixes a defect in the original MR !4752 adding cbor sequence dissecting.
2021-10-26 12:18:13 +00:00
Orgad Shaneh a114a115ba ACDR: Handle timestamps as time values instead of bytes 2021-10-26 12:15:10 +03:00
Orgad Shaneh 93b3f3b575 ACDR: Fix handling of short signaling packets
HOST --> PSTN layout is different than PSTN --> HOST.

The layout of HOST --> PSTN is:
BE16 - OpCode
BE16 - Data Size
REST - Data
2021-10-26 04:31:45 +00:00
Vadim Yanitskiy 31ca0069c9 GSM A-bis/RSL: dissect more fields in RSL_IE_OSMO_TOP_ACCH_CAP 2021-10-26 04:17:07 +00:00
Eugene Adell 4bdb4b1762 Follow Stream: Disable the Arrow button on 1st call
The first call to Follow Stream forgot to disable the arrow
button. Reverse the precedence between the display filter edition
and the display filter success now gives the expected GUI behavior.
Closes #10774
2021-10-26 04:02:14 +00:00
Gerald Combs 79a9fe1cf0 BT-DHT: Fix another loop and add NULL checks.
Make sure dissect_bt_dht_values even when we have a zero-length string.
Add a couple of NULL checks. Fixes #17677.
2021-10-26 03:47:33 +00:00
John Thacker 511ca9204f BSSAP: Split BSSAP-LE, BSAP to pinos
Move BSSAP-LE and BSAP to pinos so that Decode As on a SCCP SSN
can specify the protocol of choice. The heuristic dissector still
depends on a preference, but change the existing two boolean
preferences to a three way enum. Separate the BSSAP and BSSAP-LE
dissector tables so that the code is cleaner.

Add BSAP, BSSAP-LE, and BSSAP+ to the SCCP UAT for even finer-grained
control. Fix #16828
2021-10-25 22:59:00 -04:00
Gerald Combs a281afd9fa Tools: Add a plugin check to make-no-reassembly-profile.py.
Some of our plugins have reassembly preferences, so make sure we can
load them before creating the No Reassembly profile.
2021-10-25 11:50:06 -07:00
Balint Reczey 2103b4b074 Revert "debian: Report upstream and package version instead of git revision"
Probably it is still better to report the git version as the native package builds used to.

This reverts commit ba4bec7d09.
2021-10-25 13:52:31 +02:00
João Valverde efdf8f7d01 proto: Fix reserved filter name check
Hash table keys cannot be compared directly.

Fixes 6d4a463620.
2021-10-25 09:29:40 +01:00
Adrien Destugues d7ffd00504 DVB-S2: add to "decode as" for UDP
The heuristic dissector doesn't always work. It is convenient to have
DVB-S2 in the "decode as" menu as well.

The heuristic dissector does not dissect packets where the modeadapt
cannot be detected (CRC errors or other problems). The "decode as"
dissector, on the other hand, will attempt decoding anyway, using the
preferred mode adaptation set in preferences.
2021-10-25 04:43:40 +00:00
Gerald Combs fef8082364 GitLab CI: Move the Lintian check.
Move the Lintian check from the Ubuntu .dpkg job to the Debian package
job. This should reduce the time it takes to build merge request
pipelines a little bit.
2021-10-25 04:10:29 +00:00
Aidan MacDonald 9c322f5b55 Increase max packet size for all USB encapsulation formats
Each "packet" in the USB encapsulation formats for at least
Linux and Darwin corresponds to an OS-level USB request, so
the packets can be much larger than a USB-level packet.

The default max packet length of 256 KiB prevents Wireshark
from loading capture files that contain requests >256 KiB.
(Saving such a capture already works fine.)

Fix this by making the Linux, Darwin, and FreeBSD formats
use the same max packet length as the USBPCap format, which
is 128 MiB.
2021-10-24 22:48:20 +01:00
Gerald Combs 923ae6acca [Automatic update for 2021-10-24]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-24 17:25:30 +00:00
Jirka Novak fe98151af3 Skinny: Create RTP stream based on messages (2)
Fix in IPv6 processing
2021-10-24 09:14:42 +00:00
Martin Mathieson b52585a0ce Signal-PDU: Make a function static. 2021-10-24 09:43:18 +01:00
John Thacker b5989badb4 tcp: Throw exception instead of ASSERT for unknown PDU length
If a subdissector requests one more segment for a PDU of unknown length,
but we can't do reassembly for whatever reason, that's not necesarily a
dissector bug (while it could be the result of a bad heuristic, it can
happen from a checksum failing validation or reassembly preferences
disabled.)

The correct error is a FragmentBoundsError (dissector requested bytes
that it couldn't get due to not being reassembled), which is what
we would also throw if the returned PDU length were greater than the
tvb length instead of unknown. Fix #16689.
2021-10-24 07:43:24 +00:00
Brian Sipos c79e35d45c CBOR: Show and return actual dissected length 2021-10-24 07:28:38 +00:00
Jirka Novak 35334a1f28 Skinny: Create RTP stream based on messages
When OpenReceiveChannel/OpenReceiveChannelAck and
StartMediaTransmission/StartMediaTransmissionAck messages are seen, RTP
streams are created so Wireshark decodes related UDP as RTP.

Note: Multichannel commands (e.g. OpenMultiMediaReceiveChannel) are not
processed as I have no sample to test it.
2021-10-24 07:12:24 +00:00
João Valverde 0abe10e040 dfilter: Fix "!=" relation to be free of contradictions
Wireshark defines the relation of equality A == B as
A any_eq B <=> An == Bn for at least one An, Bn.
More accurately I think this is (formally) an equivalence
relation, not true equality.

Whichever definition for "==" we choose we must keep the
definition of "!=" as !(A == B), otherwise it will
lead to logical contradictions like (A == B) AND (A != B)
being true.

Fix the '!=' relation to match the definition of equality:
  A != B <=> !(A == B) <=> A all_ne B <=> An != Bn, for
every n.

This has been the recomended way to write "not equal" for a
long time in the documentation, even to the point where != was
deprecated, but it just wasn't implemented consistently in the
language, which has understandably been a persistent source
of confusion. Even a field that is normally well-behaved
with "!=" like "ip.src" or "ip.dst" will produce unexpected
results with encapsulations like IP-over-IP.

The opcode ALL_NE could have been implemented in the compiler
instead using NOT and ANY_EQ but I chose to implement it in
bytecode. It just seemed more elegant and efficient
but the difference was not very significant.

Keep around "~=" for any_ne relation, in case someone depends
on that, and because we don't have an operator for true equality:
  A strict_equal B <=> A all_eq B <=> !(A any_ne B).
If there is only one value then any_ne and all_ne are the same
comparison operation.

Implementing this change did not require fixing any tests so it
is unlikely the relation "~=" (any_ne) will be very useful.

Note that the behaviour of the '<' (less than) comparison relation
is a separate, more subtle issue. In the general case the definition
of '<' that is used is only a partial order.
2021-10-24 06:55:54 +00:00
Brian Sipos d2b249a445 COSE: Fix fallback to CBOR dissection when map key is registered but disabled. 2021-10-23 17:04:23 +00:00
Brian Sipos 1e42357d19 BPv7: Add proper heuristic block/payload dissection.
This also touches up the INFO column display of bundle src/dst EID.
2021-10-23 16:26:47 +00:00
John Thacker fad8346282 exceptions: set FragmentBoundsError priority above ContainedBoundsError
All fragment errors are bounds errors that go past the contained length,
but they do not necessarily involve going past the reported length,
so the checks for FragmentBoundsError should reflect that.

With some forms of reassembly, like IP fragmentation, we don't know how
big the PDU/reassembled packet is until reassembly is complete, so we
probably use tvb_new_subset_remaining() to create fragments and the tvb's
reported length is equal to its contained length. In these cases
ReportedBoundsError would be otherwise thrown, except when the existing
checks for FragmentBoundsError intervene.

However, with other forms of reassembly, like various PDUs carried over TCP,
we know the total PDU length, so we use tvb_new_subset_length[_caplen](),
setting the proper reported length, but not changing the contained
length when reassembly is not performed. In those cases, a bounds error
that occurs due to lack of reassembly is otherwise a ContainedBoundsError,
not a ReportedBoundsError.

In both cases, a bounds error caused by an unreassembled fragment should
be a FragmentBoundsError for the existing reasons. It is not necessarily
a malformed packet (to the extent reassembly is not performed because of a
malformed error elsewhere, that should be reported separately) and can
likely be avoided by changing preferences (e.g., turning reassembly
preferences on, turning off checksum verification, etc.) Otherwise it
is probably a dissector bug.
2021-10-23 15:42:10 +00:00
Huang Qiangxiong 33708af75f grpc: do not dissect empty grpc message body
close #17675
2021-10-23 15:26:35 +00:00
Eugene Adell 9bedc8af1a Follow Stream: Minor update of a variable scope
To enhance the Merge 4644, the isReadRunning variable scope is
changed to reduce the header footprint and make the code compliant
to the usual coding rules.
2021-10-23 13:28:19 +00:00
Alexis La Goutte 62de74f6a8 ieee80211: Fix warnings found by Clang Analyzer
packet-ieee80211.c:17420:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-10-23 12:46:55 +00:00
Martin Mathieson 811a80b827 ORAN FH CUS: Avoid infinite loop on section extension
Found by fuzzing local captures.
2021-10-23 12:19:35 +00:00
Jirka Novak cf41fbd897 IAX2 Stream Analysis: Fix of mean jitter calculation
Calculation was using incorrect variable so calculation was incorrect.
Patch corrected this mistake.
2021-10-23 12:01:54 +00:00
John Thacker 11298a5b2c DCERPC: Strengthen heuristic, fix PDU length
The fragment length field of DCERPC connection-oriented PDUs includes
the length of the fixed header, and so must be at least that large.
Don't return a (bogus) PDU length zero from get_dcerpc_pdu_len,
because tcp_dissect_pdus interprets that as "need one more segment"
instead of as a bogus value; instead return one, which the TCP
dissector will correctly recognize as bogus.

Also, take into account the offset passed into get_dcerpc_pdu_len
(it is almost always 0, which is why the code previously worked),
and increase the fixed length value passed to tcp_dissect_pdus
to the real fixed header length (so that the TCP dissector will
recognize more bogus values as bogus.)
Fix #14728.
2021-10-22 23:16:39 -04:00
Gerald Combs ca8e6f3db4 Qt: Add back some Q_OBJECT calls.
They're needed in some places for translations.
2021-10-22 16:47:38 -07:00
Guy Harris 27990832cb dumpcap: don't tell users to bother the Npcap developers.
The issue in question is Npcap issue 250, for which work is being
considered in Npcap issue 506; this is all apparently due to Windows
tearing down and reassembling the networking stack in various sitations.
See @jtippet's comments in Npcap issue 250.

We just tell users that this is a known problem, work is being done on
it, so there's no need to report it.
2021-10-22 15:00:16 -07:00
Gerald Combs 15536d71ef Tools: Fix some fuzzing logic.
Fix a conditional that was inadvertently inverted in d7bdd77a4c.
2021-10-22 20:19:13 +00:00
Martin Mathieson c983a219e3 Autosar IPDU Multiplexer: make some functions static
Also fix up check_static.py - dissectors.c.o has moved.wq
2021-10-22 17:50:21 +01:00
Nan Xiao 9c294546d1 EVS: Decode Reserved bit for 48/96/128 kbps 2021-10-22 17:30:32 +08:00
David Fort bfafc30aee rdp: dissect fastpath packets
This patch adds basic decoding of fastpath packets.
2021-10-22 07:35:59 +00:00
David Fort a0885c6e03 rdp_multitransport: fill the info column
Nothing was set for CreateRequest and CreateResponse messages.
2021-10-22 07:35:59 +00:00
David Fort 5eec78ca28 rdp: fix dissecting of bandwidth messages
There was a swap between server and client messages, the patch correct this.
2021-10-22 07:35:59 +00:00
João Valverde 8c9019a155 wireshark.h: Remove wmem dependency.
Start smaller. Remove the return macros from wslog.h because
that pulls in a wmem dependency and the interface is not very
stable yet.
2021-10-22 06:41:44 +00:00
João Valverde 1acae21bcd Windows: Fix warnings using flex
Fix some warnings complaining of macro redefinitions with stdint.h.
Include stdint.h via wireshark.h everywhere so it stays fixed.
2021-10-22 06:41:44 +00:00
João Valverde 916b3ee06e Add wslog.h to wireshark.h
wslog has a small surface, few dependencies and is near essential
for Wireshark development and debugging.

Pulling wmem.h is not a problem either, the library is self contained
and again memory allocation and general data structures are essential
components.
2021-10-22 06:41:44 +00:00
João Valverde 59c082c046 Add new global header wireshark.h with guideline
Remove ws_diag_control.h from config.h because that was a workaround
for the lack of a public global header. Fix the resultant build errors.
2021-10-22 06:41:44 +00:00
Dr. Lars Völker 79b0e4999a AUTOSAR I-PduM dissector
This patch adds the AUTOSAR I-PduM dissector.
2021-10-22 05:49:34 +00:00
Eugene Adell 5863a7cbeb Ensure a single Follow Stream is running only
When changing one of the selection parameters in the Follow Stream
dialog while a filtering task is already running, the result is
inaccurate.
While a filtering task is already running in the Follow Stream
dialog, any filter change which triggers a new filtering gives a
wrong result. Both the displayed data and the Save As functions
are impacted. Closes #15637
2021-10-22 05:30:51 +00:00
Nan Xiao a36e995dd3 EVS: Decode BW for 9.6/16.4/48/96/128 bps 2021-10-22 04:58:11 +00:00
John Thacker e2586301a3 bittorrent: Do some PDU length validity checking
We know the lengths (or at least bounds on them) for most message
types, so if we have a nonsense value assume that we're actually
seeing Continuation Data (or unsupported Message Stream Encryption.)

Also support the extended message type a little bit, at least to
display the bencoded dictionary when it's type ID 0.
2021-10-22 04:40:35 +00:00