Commit Graph

89601 Commits

Author SHA1 Message Date
Guy Harris ec915136d9 blf: add some comments to the header.
More information about the file format.

[skip ci]
2023-11-18 00:12:05 -08:00
John Thacker 855c445d14 Capture Filter Syntax Worker: free BPF program
Call pcap_freecode after checking the syntax. Plugs a leak
2023-11-18 01:45:15 +00:00
John Thacker e15d167646 wsug: Add interface name to temporary capture file name
[skip ci]

Follow-up to fix #18464
2023-11-17 19:12:13 -05:00
Stig Bjørlykke 7c9946bdab ncp-sss: Fix header field abbrevs
Fix header field abbrev to match protocol name.
Rename variables to use hf_ prefix.
2023-11-17 22:33:07 +00:00
João Valverde d6f158c848 5Co: Fix protocol name in fields
The field name should match the protocol name. Furthermore protocol
names starting with a digit cannot contain '-'.

Fixes #19489.
2023-11-17 20:22:51 +00:00
Maxence Younsi 5c8ba89ef3 bmp: fix peer down RFC9069 TLV parsing 2023-11-17 16:19:13 +00:00
Stig Bjørlykke 5a57a8499d dissectors: Rename hf and ett variables
Rename static hf and ett variables to be prefixed with hf_ or ett_
to align with the majority of dissectors.
2023-11-17 15:08:25 +00:00
Stig Bjørlykke 6e39bcc7fa rdpudp: Fix header field abbrevs
Fix header field abbrev to match protocol name (rdpudp2 -> rdpudp).
Rename variables to use hf_ prefix.
2023-11-17 15:07:22 +00:00
Stig Bjørlykke ea85bff16c dcerpc-netlogon: Fix header field abbrevs
Fix header field abbrev to match protocol name.
Rename variables to use hf_ prefix.
2023-11-17 15:06:24 +00:00
Stig Bjørlykke 1222d2ec65 tei_management: Fix header field abbrevs
Fix header field abbrev to match protocol name.
Rename variables to use hf_ and ett_ prefix.
2023-11-17 14:43:36 +00:00
Stig Bjørlykke 50585a94bb idn: Fix header field abbrevs
Fix header field abbrev for protocol_version_minor.
Rename variables to use hf_ prefix.
2023-11-17 12:35:02 +01:00
snicket2100 935df1e875 bitcoin: dissecting segwit transactions (witness fields etc.) 2023-11-17 09:30:25 +00:00
Huang Qiangxiong 3fac54aaa8 XML: fix issue about parsing encoding attr when standalone attr exists
close #19485

At the same time, this commit fixed a bug introduced from MR !12306 that
cause the encoding attribute unable to be parsed (the {,50} should be
{1,50}).
2023-11-17 09:23:06 +00:00
Stig Bjørlykke 34d9cc68a1 dissectors: Remove init of hf and ett variable arrays
Manually remove init of hf and ett variable arrays because this
cannot be easily done using the convert script.
2023-11-17 07:41:44 +00:00
Stig Bjørlykke 9e59a18db8 dissectors: Rename expert_field variables
Rename static expert_field variables to be prefixed with ei_
to align with the majority of dissectors.
2023-11-17 07:24:05 +00:00
John Thacker 3b386ed6e6 docs: Temporary capture file format
The XXXXXX is not a number, it's alphanumeric

[skip ci]

Fix #18464
2023-11-16 23:08:42 -05:00
John Thacker 656649d033 wiretap: Write MPEG-2 Transport Streams to native format
Write WTAP_ENCAP_MPEG_2_TS to its native format, which
means just writing the packet bytes. This allows opening
up a transport stream, filtering, and writing the result
back in its native format instead of a pcap/pcapng.
2023-11-17 03:47:05 +00:00
John Thacker e675c13f89 SCSI-SBC: Handle Service Action In limited by allocation length
Use the special SCSI handling and exception for when data is
truncated due to a too short allocation_length. See packet-scsi.h
for discussion.

Related to #13397
2023-11-16 22:21:30 -05:00
John Thacker 07638b0646 RSVD: Handle MS-RSVD TUNNEL_SCSI_RESPONSE spec 7.0-10.0
MS-RSVD, in specification versions 7.0-10.0, changed the
SenseInfoExLength and SenseDataEx fields so that instead of
SenseDataEx being a variable length field with length given by
SenseInfoExLength, SenseDataEx was a fixed 20 octet field where
SenseInfoExLength gave the length of meaningful data in the field.
Then it was changed back.
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rsvd

Luckily, there's a Length field that measures the size of the struct
with the other fixed fields plus SenseDataEx, but not the other
variable field, the DataBuffer. In the version with the fixed 20
octet field, Length MUST be 36 (which indeed is the only value
consistent with a 20 length SenseDataEx.)

Fix #13397.
2023-11-16 21:27:26 -05:00
John Thacker 25db7cf10b RSVD: Don't create tasks twice, handle responses before requests
We create the task on the first pass, but should only do
so if we haven't seen the request ID yet (it is guaranteed
to be unique on the client by spec.) Don't create it a
second time for the response on the first pass if we've seen
the request.

When creating the task on a response, fill in the request/response
frame information correctly (that is, reversed from a request)
instead of treating the response as a request.

The op-code value won't be known if we haven't seen the request
yet, but if it happens later we can see it on the second pass.

Previously we created the task on the first pass a "request" task
even for responses, which caused some quirks on first-pass dissecting
and on redissection after changing preferences.

Related to #13397
2023-11-17 00:35:31 +00:00
John Thacker c25e0f9084 Fix overriding capture option prefs at the command line
Some capture options can be overridden with command line arguments.
We want those options, like -p, -n/-P, -H, -S, and --update-interval,
to take precedence over preferences, at least until the user saves
preferences or switches profiles (at which point the new settings
will be applied.) That means we have to apply preferences to capture
options before we read most command line arguments.

However, preferences can be altered at the command line, including
the preferences that affect the capture options. So we have to
read the command line arguments that alter preferences after
reading preferences (which has to be after reading command line
arguments that control what preferences are read, like the
configuration profile), but before applying preferences to the
capture options.

Add a new "process some command line options" function that only
gets the command line options that override preferences. Final
interleaved command line / preference / capture options sequence:

1. Read command line arguments that affect what preferences to read
2. Initialize capture options to default value
3. Read preferences
4. Read command line arguments that affect value of already read
   preferences
5. Apply preferences to capture options
6. Read other command line arguments, set capture options final values
7. Apply other preferences

Fix #14549
2023-11-17 00:04:46 +00:00
Martin Mathieson 9a28224e93 Exporting hex strings: speed up a little by not zeroing temp buffer 2023-11-16 20:41:46 +00:00
John Thacker 71cec914fe QUIC: Heuristically search for coalesced (e.g. GSO) short header packets
RFC 9000 12.2 "Coalescing Packets" notes:
"Retry packets (Section 17.2.5), Version Negotiation packets (Section
17.2.1), and packets with a short header (Section 17.3) do not contain
a Length field and so cannot be followed by other packets in the same
UDP datagram."

However, if we have a DCID with a non-zero length, then we can search
for coalesced packets by searching for the DCID. If the DCID length
is sufficient, then this has a low probability of false positives.

Note that we are still not relaxing another condition mentioned:
"Senders MUST NOT coalesce QUIC packets with different connection IDs
into a single UDP datagram." An implementation might do so through
GSO, I suppose (particular if multipath is in use?)

Fix #19109
2023-11-16 07:34:00 +00:00
John Thacker 5d52bc5e10 Mongo: Detect both with and without TLS
Mongo uses the same port whether using TLS or not. When dissecting
over TCP, used some heuristics based on the opcode to determine whether
or not it looks like Mongo directly. If not, reject it; the TLS
heuristics are good and should pick it up.

Still register the port in the TLS port dissector, just don't set
TLS as the default for that TCP port, in order to test insecure Mongo.

Also, use whether the Response To field is nonzero for setting
the Info column as a response, since recent Mongo uses the
same Message opcode for both requests and responses.

Fix #14381
2023-11-16 07:32:15 +00:00
Martin Mathieson c4b97d1f52 Start to check range_strings 2023-11-08 03:25:47 +00:00
Joakim Karlsson 3bb1c53aaa DHCP: adding Enterprise handle in Opt 124 Vendor Class 2023-11-15 20:42:12 +00:00
Stig Bjørlykke 17b30b2e9a h265: Remove unused comments in hf variables
Remove comments behind some hf entries to prepare for the bigger
change removing the initialize to -1.
2023-11-15 16:28:48 +00:00
Peter Wu c1c8a04db4 TCP, UDP: fix formatting for zero-padded partial checksums
Relates to #18864
2023-11-15 12:45:13 +00:00
Pascal Quantin 200a52616d NGAP: add dissection of n2MbsSmInfo media type payload
Also update the N2SmInfoType enumeration while in the area

Closes #19484
2023-11-15 12:08:27 +00:00
Martin Mathieson 5233a55fdf A few more item warning fixes 2023-11-07 22:40:48 +00:00
Stig Bjørlykke a2e90a6557 Qt: Update correct row in Advanced preferences
When changing a value in Advanced preferences the index given to
dataChanged() must be made for correct parent.

Update all columns because the font may have changed.
2023-11-15 10:26:09 +01:00
John Thacker bee7b2cb8e Qt: Fix Recent Files Max Count at startup
The recent files are read from recent_common in main.cpp, which
happens before the prefs are read. (This is largely unavoidable,
as we need some things in recent first, notably the last used
preference Configuration Profile.)

That means we add the recent files before we've read the preference
that determines the maximum number of recent files, so it still
has its initial value of 10 - the number of files in recent_common
will be whatever value the last used Configuration Profile had
for the preference, and could be greater (or lesser) than 10.
It could also be different than the value for the preference
after the preferences are loaded, if Wireshark is started with
command line options like -C, -o, or -P.

Add a parameter so that on initial startup, when recent_common is
read, we add all the files to the list heedless of the pref value.

Add connections so that the Menu and the Welcome Page list update the
list of recent files whenever the Preferences are changed
(including from changing Configuration Profiles), because
that might change the max number of recent files.

Add a few guards for putting too many items in the recent common
file or the menu, for when the preference changes so that the
maximum count is lower than it was previously.

Fix #16782
2023-11-15 08:57:36 +00:00
Gerald Combs 8988d21d26 Qt: Use qstring_strdup in more places 2023-11-15 08:56:29 +00:00
Joakim Karlsson b40c7d6c8a LIX2: Update to 3GPP TS 33.128 V18.5.0 2023-11-15 08:54:52 +00:00
Joakim Karlsson 6360ddacb3 LI5G: lift dissector to ETSI TS 103 221-2 V1.6.1 2023-11-15 08:53:34 +00:00
Martin Mathieson e1fdc2224a tshark: -U must be one of the export PDU taps 2023-11-15 08:50:10 +00:00
Guy Harris 304868dcf6 capture_file_dialog: update a comment.
[skip ci]
2023-11-14 19:36:11 -08:00
Guy Harris 81edda6c32 http: clean up some issues with the Load Distribution statistics.
As per

https://ask.wireshark.org/question/32969/what-does-ko-mean-in-http-load-distribution-statistics/

1) treat a "100 Continue" as OK rather than an error; it's not obvious
why 100 is different from other 1xx status values, and ">" rather than
">=" might just have been a mistake;

2) use "Error", rather than "KO" for 4xx and 5xx (and undefined)
statuses, as it's not necessarily obvious what "KO" means.
2023-11-14 15:15:39 -08:00
Martin Mathieson d48e0a75cc Fix (or disable) more dissector item warnings 2023-11-14 20:51:12 +00:00
John Thacker 7b550c21d4 docs: Add wsug chapter on 802.11 Decryption Keys, link UAT help
Initially taken from the Wiki page (including images, compressed
with tools/compress-pngs.py), and expanded to cover lastest additions.

Link the Help button from the 802.11 Decryption Keys UAT to the page.

Fix #11273
2023-11-14 19:47:35 +00:00
Stig Bjørlykke fb3e2bf984 Qt: Add an option to show changed preferences
Add a "Show changed values" check box to the advanced preferences page.
This will filter only changed preferences.
2023-11-14 18:48:47 +00:00
Gerald Combs 7cd82a923c GitLab CI: Copy our Debian packages instead of moving them
...so that lintian can run
2023-11-14 09:16:12 -08:00
Gerald Combs 6ce97e418b Docs: Move attributes.adoc to the doc directory 2023-11-14 06:07:53 +00:00
John Thacker a0839b6e5e dot11decrypt: Fix bits number
This isn't used anywhere, but since we're storing key as
a GByteArray the bytes are multiplied by 8, instead of 4 when
it was stored as a string.

Fixup 24570a3573
2023-11-13 23:02:30 -05:00
John Thacker 09e9b352d0 dot11decrypt: Explain why key parsing failed
Have parse_key_string take a pointer to char* (such as
the one from a uat_update_cb_t) and set the failure reason
when returning NULL. This should be more user friendly than
just "Invalid key format".

Related to #11273
2023-11-13 18:48:28 -05:00
Guy Harris 7a82a9707c Make the code that handles the file open dialog style common code.
Move it from a some dialog boxes' code to get_open_dialog_initial_dir().
2023-11-13 21:30:47 +00:00
João Valverde 46a97fe111 More fixes when converting display macro configuration 2023-11-13 21:23:47 +00:00
Pascal Quantin 22c6a8f0d4 RF4CE: protect against an out of bounds copy
Fixes #19479
2023-11-13 17:30:25 +00:00
Gerald Combs 3fa9915a1a Debian: Update our symbols 2023-11-13 17:01:05 +00:00
João Valverde 91465bcb8b Qt: Fix display filter macros when switching profiles
We need to reload the display filter macros when switching profiles.
This was done automatically before by the UAT sub-system.
2023-11-13 15:57:25 +00:00