Commit Graph

79294 Commits

Author SHA1 Message Date
Alexis La Goutte 7c0d9c1426 capwap: fix item length
reported by check_typed_proto_items.py
packet-capwap.c:1810 proto_tree_add_item called for hf_capwap_fortinet_mesh_eth_bridge_enable  -  item type is FT_UINT32 but call has len  1
packet-capwap.c:3015 proto_tree_add_item called for hf_capwap_control_header_msg_type_enterprise_nbr  -  item type is FT_UINT32 but call has len  3
2020-11-15 10:02:44 +00:00
Alexis La Goutte 32f89a492b dns: fix item length
reported by check_typed_proto_items.py
packet-dns.c:1688 proto_tree_add_item called for hf_dns_rr_len  -  item type is FT_UINT32 but call has len  2
packet-dns.c:1719 proto_tree_add_item called for hf_dns_rr_len  -  item type is FT_UINT32 but call has len  2
packet-dns.c:2493 proto_tree_add_item called for hf_dns_px_preference  -  item type is FT_UINT8 but call has len  2
2020-11-15 10:02:44 +00:00
Alexis La Goutte cc8ac80b54 couchbase: fix item length
reported by check_typed_proto_items.py
packet-couchbase.c:1403 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1405 proto_tree_add_item called for hf_extras_nru  -  item type is FT_UINT16 but call has len  1
packet-couchbase.c:1426 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1453 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1471 proto_tree_add_item called for hf_extras_nmeta  -  item type is FT_UINT32 but call has len  2
packet-couchbase.c:1522 proto_tree_add_item called for hf_extras_nru  -  item type is FT_UINT16 but call has len  1
2020-11-15 10:02:44 +00:00
Alexis La Goutte 7530c337b5 cdp: fix item length
reported by check_typed_proto_items.py
packet-cdp.c:298 proto_tree_add_item called for hf_cdp_ttl  -  item type is FT_UINT16 but call has len  1
packet-cdp.c:1225 proto_tree_add_item called for hf_cdp_nrgyz_tlvtype  -  item type is FT_UINT16 but call has len  4
2020-11-15 10:02:44 +00:00
Alexis La Goutte bf4622c05a bluecom: fix item length
reported by check_typed_proto_items.py
packet-bluecom.c:435 proto_tree_add_item called for hf_bcp_hdr_cmd  -  item type is FT_UINT32 but call has len  1
packet-bluecom.c:441 proto_tree_add_item called for hf_bcp_hdr_len  -  item type is FT_UINT8 but call has len  2
2020-11-15 10:02:44 +00:00
Alexis La Goutte 692ab543e6 BGP: fix item length
reported by check_typed_proto_items.py
packet-bgp.c:8440 proto_tree_add_item called for hf_bgp_update_encaps_tunnel_subtlv_lb_block_length  -  item type is FT_UINT16 but call has len  4
packet-bgp.c:9152 proto_tree_add_item called for hf_bgp_route_refresh_orf_entry_sequence  -  item type is FT_UINT8 but call has len  4
2020-11-15 10:02:43 +00:00
Alexis La Goutte 31666c5214 awdl: fix item length
reported by check_typed_proto_items.py
packet-awdl.c:889 proto_tree_add_item called for hf_awdl_electionparams_private_phc  -  item type is FT_UINT32 but call has len  2
2020-11-15 10:02:43 +00:00
Alexis La Goutte c7bd8baea2 AIM: Fix item length
reported by check_typed_proto_items.py
epan/dissectors/packet-aim.c:2380 proto_tree_add_item called for hf_generic_idle_time  -  item type is FT_UINT32 but call has len  2
epan/dissectors/packet-aim.c:3222 proto_tree_add_item called for hf_aim_messaging_unknown  -  item type is FT_UINT16 but call has len  1
2020-11-15 10:02:43 +00:00
Alexis La Goutte febf7aa643 IAP(Aruba): fix item length
reported by check_typed_proto_items.py
epan/dissectors/packet-aruba-iap.c:113 proto_tree_add_item called for hf_iap_unknown_uint  -  item type is FT_UINT32 but call has len  1
2020-11-15 10:02:43 +00:00
Guy Harris e3047d9b38 Pass an address-family-appropriate socket length to connect().
Some UN*Xes (4.4-lite-derived, such as the obscure, little-known macOS,
FreeBSD, NetBSD, OpenBSD, and DragonFly BSD) have a length field in the
socket address structure.

That was originally done for OSI address support; unlike most transport
addresses, such as IPv4 (and IPv6) addresses, where the size of the
address is fixed, the size of an OSI transport layer address is *not*
fixed, so it cannot be inferred from the address type.

With the dropping of OSI support, that field is no longer necessary in
userland.  System calls that take a socket address argument also take an
address length argument; in newer (all?) versions of the {macOS,
FreeBSD, NetBSD, OpenBSD, DragonFly BSD} kernel, the system call code
sets the length field in the kernel's copy of the address to the address
length field value.

However, that means that you have to pass in the appropriate length; if
you have a sockaddr_storage that might contain an IPv4 address or an
IPv6 address, connect() (and bind()) calls should use the IPv4 address
size for IPv4 addresses and the IPv6 address size for IPv6 addresses,
otherwise, at least on macOS, the call fails.

In cap_open_socket(), report socket() and connect() errors separately,
to make it easier to determine where TCP@ captures fail, if they do
fail.  (That's how I got here in the first place.)
2020-11-15 07:33:50 +00:00
John Thacker 5df3f5d05d Encodings: Fix missing pointer increment in 3GPP TS 28.038 unpacked
The pointer isn't incremented in get_ts_23_038_7bits_string_unpacked
so it just decodes the first octet length times.
2020-11-14 23:39:18 -05:00
Martin Mathieson 646bfde7fa Fix some filter names.
Detected by 'tools/check_typed_item_calls.py --consecutive'
2020-11-14 21:22:42 +00:00
Developer Alexander a9e414ce54 Tuning of IO Graph intervals
Improves the resolution of interval steps that can be selected in IO Graph.
Selectable interval steps follow a scheme of 1 -> 2 -> 5 -> 10.
Having a broad choice of different intervals is important for visualizing.
2020-11-14 19:39:24 +00:00
Pascal Quantin 30ca4b72ec NAS EPS: upgrade dissector to v16.6.0 2020-11-14 19:27:05 +01:00
Anders Broman 62730dc4fe NAS-5GS: Start upgrading to release 17.0 2020-11-14 16:38:58 +00:00
Pascal Quantin 8c29bfe8b2 NAS EPS: fix inverted description of 2 N1 UE network capability IE fields 2020-11-14 16:02:16 +01:00
Guy Harris c2bd3bc487 xml: fix list of default media types for XML.
One entry in the list of strings didn't have the comma at the end, so
the entry after it was concatenated with it, forming a bogus entry and
causing neither "application/vnd.3gpp.mcptt-info+xml" nor
"application/vnd.3gpp.mid-call+xml" to be recognized by media type as
XML.

Should resolve Coverity CID 1355680.
2020-11-13 19:18:23 -08:00
Martin Mathieson 08d7e14cdd Fix a few more item lengths. 2020-11-14 00:15:35 +00:00
Gerald Combs 3a7966c716 Qt+epan: Print better-looking values in the packet diagram.
Pull the value-formatting code in proto_custom_set into
proto_item_fill_display_label. Use that in FieldInformation::toString
instead of fvalue_to_string_repr. Fixes #16911.
2020-11-13 19:41:51 +00:00
Pascal Quantin 440d8ceff9 NAS-EPS: remove an extra spare bit
It has been replaced by the 15 bearers capability during R15 development
2020-11-13 19:10:20 +01:00
Pascal Quantin e35752c252 3GPP NAS: upgrade dissector to v16.6.0 2020-11-13 15:40:19 +01:00
Pascal Quantin ea311f2e21 MBIM: fix mbim.control.ms_app_info.app_name display 2020-11-13 14:33:19 +01:00
Anders Broman 6228e18648 xml: Add default media type application/vnd.3gpp.mcptt-info+xml 2020-11-13 09:25:54 +00:00
Michael Pergament cb430d2ef2 TCP AO: Add dissection for RFC5925 TCP AO
Add TCP AO option dissector based on RFC5925
2020-11-13 09:04:41 +00:00
Alexis La Goutte 8b512665fc MMRP: Fix wrong offset for service attribute type
Issue reported by Nils Andersen

Close #17005
2020-11-13 08:41:50 +00:00
Gerald Combs 96eec0beb9 Qt: Fetch byte view text font metrics more often.
Add ByteViewText::updateLayoutMetrics, which fetches the character width
and line height.  Call it whenever our font changes and when we're about
to paint. Blind attempt at fixing #15819.
2020-11-12 13:37:56 -08:00
Martin Mathieson 580de09849 Fix a few spelling mistakes. 2020-11-12 09:52:52 +00:00
Huang Qiangxiong 08509b5aa6 Protobuf: feature of adding missing fields with default values
Make Protobuf fields that are not serialized on the wire (missing in
capture files) to be displayed with default values by setting the new
'add_default_value' preference. The default values might be explicitly
declared in 'proto2' files, or false for bools, first value for enums,
zero for numeric types.
Default values are generated in epan/protobuf_lang_tree.c during the
nodes of fields are created. The default_value_xxx() methods of field
descriptor are added into epan/protobuf-helper.c/h and
epan/protobuf_lang_tree.c/h files.

close #17000
2020-11-12 07:24:51 +00:00
Nardi Ivan 5e45f770fd QUIC: fix handling of Key Update
After a key update, we should update Packet Protection cipher but
we shouldn't touch the Header Protection one.
With the current code, PP and HP ciphers are quite entangled and we
always reset both of them. Therefore, at the second key update we
reset the used 1-RTT HP cipher too; no wonder even header decryption
fails from that point on.

To properly fix this issue, all the ciphers structures has been rewritten,
clearly separating PP code from HP one.

Close #16920
Close #16916
2020-11-11 21:55:51 +00:00
Hideaki HAYASHI 986a4712ba epan: BGP Prefix-SID attribute SRv6 SID support
[Update] BGP Prefix-SID definition (from draft-ietf-idr-bgp-prefix-sid-05 to RFC8669).
[Support] BGP Prefix-SID SRv6 SID (draft-ietf-bess-srv6-services-05)
2020-11-11 13:26:18 +00:00
Gerald Combs 33e63d19e5 RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.

Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating and leaking a GBytes struct.
2020-11-10 10:54:38 -08:00
Martin Nyhus 8e93097147 bt-dht: don't iterate on strings in values
Each peer in a get_peers response has its own entry in the list, unlike
the way nodes are represented, so if we see a string_len we don't
recognize (like 18 for IPv6 peers) treating it as several IPv4 peers
doesn't make sense.
2020-11-10 08:39:53 +00:00
Chuck Craft 3730eb251f Qt: enable sorting for Help->About tables 2020-11-10 07:52:18 +00:00
Jaap Keuter 57fc841aea RTCP: try to continue dissection with partial SRTCP packet
When due to limited capture length the tailing part of the SRTCP packet
is missing it might be impossible to know the encryption status of this
packet. Before retrieving that information make sure that's even possible,
otherwise continue as if not encrypted.
2020-11-10 07:29:51 +00:00
Martin Mathieson 07f048f1f2 parsing enterprises file: comment and slightly simplify
This is roughly 10% of tshark startup time.
- Enterprise string does not need to be trimmed at the beginning
- No need to call g_hash_table_replace() as keys are just guint32
2020-11-10 05:54:54 +00:00
Pau Espin dfa8a3fe5a rlcmac: Fix EGPRS UL data block TLLI endianess
According to TS 44.060, figure 10.3a.2.1, note 2, the TLLI is
encoded in little endian for EGPRS (while big endian is used in GPRS).
2020-11-09 12:59:54 +01:00
Gerald Combs d0b0094bf3 WSUG: Add a note about verifying downloads. 2020-11-09 08:56:28 +00:00
Gerald Combs c394a7a87b Kafka: Fixup returned offsets and initialize variables.
Many of the Kafka dissector's type dissection routines either returned
an offset or -1 in the event of an error. We don't appear to check for
errors anywhere, so ensure that those routines always return a valid
offset.

Make those routines always initialize their type offset and length
variables. Fixes #16985.
2020-11-08 14:03:31 -08:00
Martin Mathieson 913001b817 Opensafety: fix some item lengths 2020-11-08 20:56:41 +00:00
Gerald Combs e1c72bd47c [Automatic update for 2020-11-08]
Update manuf, services enterprise numbers, translations, and other items.
2020-11-08 19:09:19 +00:00
Nardi Ivan a175435c0a QUIC: improve migration support
We should keep track of CID reported in Preferred Address Transport Parameter

Close #16915
2020-11-08 15:26:42 +00:00
Gerald Combs d5f2657825 epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958.
2020-11-07 19:51:20 +00:00
Gerald Combs 51145c62e6 wiretap: Update pcapng systemd timestamp handling.
It's easy to create systemd blocks with a missing or invalid
__REALTIME_TIMESTAMP= field when fuzz testing. If that's the case, leave
WTAP_HAS_TS unset instead of returning an error. Fixes #16965.
2020-11-07 17:53:14 +00:00
Martin Mathieson 50dcb5d6f4 Fix some more item lengths. 2020-11-07 14:29:43 +00:00
João Valverde b65ff23d6b IPv6: Try to fix CID 1468890
Without a default swich case Coverity flags a possible
divide by zero error.

While at it remove unneeded initializers because it is a symptom
of the same issue.
2020-11-07 00:36:46 +00:00
Martin Mathieson d90f8da3d8 Fix some more item lengths. 2020-11-06 20:36:15 +00:00
John Bankier 3632642980 SMB: Dissection of Dynamic Access Control specific ACEs
Added dissection for Dynamic Access Control (DAC) specific ACEs.
These are Conditional ACEs, System Resource Attribute ACEs and System
Scoped Policy ID ACEs.

A Condition ACE must be one of the following types:
    ACE_TYPE_ACCESS_ALLOWED_CALLBACK
    ACE_TYPE_ACCESS_DENIED_CALLBACK
    ACE_TYPE_ACCESS_ALLOWED_CALLBACK_OBJECT
    ACE_TYPE_ACCESS_DENIED_CALLBACK_OBJECT
    ACE_TYPE_SYSTEM_AUDIT_CALLBACK
    ACE_TYPE_SYSTEM_AUDIT_CALLBACK_OBJECT

Such an ACE may include a conditional expression (that will, if
present, be evaluated to determine whether or not the ACE allows or
denies access). If a conditional expression is present the ACE data
will start with the string "artx". The remainder of the ACE data will
be the conditional expression which is simply a list of tokens
(see MS-DTYP for details of each token type). With this change,
filter "nt.ace.cond" can be used to find packets containing one or
more Conditional ACEs and their details are dissected.

A System Resource Attribute ACE has a name, value type and a list of
values. The value types are: INT64, UINT64, STRING, SID, BOOLEAN and
OCTET_STRING (i.e. binary data). With this change, filter "nt.ace.sra"
can be used to find packets containing one or more System Resource
Attribute ACEs and their details are dissected.

System Scoped Policy ID is simply a new ACE type and it does not
require any new dissection. The SID associated with a System Scoped
Policy ID ACE will start with S-1-17 and identifies the "Central
Access Policy" that should be used.
2020-11-06 18:52:04 +00:00
John Thacker ac34f3e8b6 RPM+CI: Update and fix for Fedora 33, CentOS 8, OpenSUSE Leap 15.2
Re-enable Fedora build and add CentOS 8 and OpenSUSE 15.2 builds.
Fedora 33 does out of build tree cmake builds and needs spec file changes.
CentOS 8 has some changes with cmake and other packages that are similar to
older Fedora, and needs extra repositories enabled to get -devel packages
(still missing -devel for some optional libraries). OpenSUSE Leap 15.2 also
has some changes needed to build. Note that OpenSUSE Leap 15.1 is EOL
at the end of November 2020. Fixes #16971
2020-11-05 17:58:16 -05:00
Jaap Keuter 57b6666920 giop: free the buffer where its at
Followup on commit 40ce72f1a8
2020-11-05 16:32:55 +01:00
John Thacker 84ddbf373e RTCP: Initialize padding_item
Declare padding_item outside the while loop and initialize it, as we
want the value from the previous loop iteration when using it for
expert_info. Fixes clang build warnings.
2020-11-05 13:36:10 +00:00