Commit Graph

41611 Commits

Author SHA1 Message Date
Guy Harris 127f8e47ee 802.11: clean up data frame handling.
Change

    case DATA_FRAME:
        if (condition) {
            do stuff;
            break;
        }
        do other stuff;
        break;

to

    case DATA_FRAME:
        if (condition) {
            do stuff;
        } else {
            do other stuff;
        }
        break;

to make it clearer that it's "do this if condition is true, else do
that".


(cherry picked from commit 258fb14821)
2020-11-29 18:09:47 +00:00
Guy Harris d73b87e52a llc: don't fetch the etype until it's needed and if it's present.
This avoids throwing exceptions in some cases.


(cherry picked from commit ee764b8d7d)
2020-11-29 10:08:12 +00:00
Guy Harris 2f391e81d6 llc: clean up indentation.
(cherry picked from commit 3f8423c267)
2020-11-29 09:21:49 +00:00
Pascal Quantin 4d2c7b9940 S1AP: fix decoding of inter eNB transparent container from NGAP
(cherry picked from commit 74c0b2134b)
2020-11-24 13:45:38 +00:00
Pascal Quantin 095cb11a36 QUIC: fix compilation without HAVE_LIBGCRYPT_AEAD
(cherry picked from commit 8c99f4de8d)
2020-11-24 12:47:46 +00:00
Pascal Quantin dcd7a99f1d NAS 5GS: request type field is 3 bits long
(cherry picked from commit 9fdc3fb3ce)
2020-11-23 22:35:10 +00:00
Pascal Quantin 7097d817a2 NAS 5GS: fix PDU address type, PDU session type and SSC mode bit width 2020-11-23 16:56:17 +01:00
Nardi Ivan 436cddcc84 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


(cherry picked from commit 5e45f770fd)
2020-11-23 08:47:47 +00:00
Joakim Andersson 233f80f21b bluetooth: Fix dissecting of packets received on LE Coded PHY
Fix dissecting of packets received on LE Coded PHY. These packets
will include the extra field "coding indicator" after the access
address.
The assignment of phy in the common bluetooth context was missing,
leading to this field being left out and the offset being wrong.

(cherry picked from commit c586f71a5c)
2020-11-21 18:08:12 +01:00
John Thacker 793142cbec RFC2190: Fix bitmasks for several fields in mode A
Fixes some errors that the packet diagram helped make obvious.
Closes #17025.


(cherry picked from commit 5d374fed36)
2020-11-19 01:06:11 +00:00
Jaap Keuter dd88e7a90b HTTP: Restore SSTP support
Add exclusion for SSTP having Contents-Length and no body.
Closes #17024


(cherry picked from commit 0250e4e2e4)
2020-11-18 14:46:20 +00:00
Jason Cohen d304fa8431 f5ethtrailer: Replace ingressslot and ingressport with reserved 2020-11-17 11:07:43 -06:00
John Thacker cd6afd7c9b 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.


(cherry picked from commit 5df3f5d05d)
2020-11-15 07:07:00 +00:00
Pascal Quantin a0ce8fa84d NAS EPS: fix inverted description of 2 N1 UE network capability IE fields
(cherry picked from commit 8c29bfe8b2)
2020-11-14 15:30:45 +00:00
Pascal Quantin 5010face74 NAS-EPS: remove an extra spare bit
It has been replaced by the 15 bearers capability during R15 development


(cherry picked from commit 440d8ceff9)
2020-11-13 18:36:33 +00:00
Pascal Quantin 7e94496598 MBIM: fix mbim.control.ms_app_info.app_name display
(cherry picked from commit ea311f2e21)
2020-11-13 16:05:18 +00:00
Alexis La Goutte f7e8752d2f MMRP: Fix wrong offset for service attribute type
Issue reported by Nils Andersen

Close #17005


(cherry picked from commit 8b512665fc)
2020-11-13 13:15:47 +00:00
Gerald Combs 6ece1c896d 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.


(cherry picked from commit 33e63d19e5)
2020-11-10 22:28:08 +00:00
Gerald Combs c8fedf65b2 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.


(cherry picked from commit d5f2657825)
2020-11-09 17:48:52 +00:00
Pau Espin 6891c21fe1 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).


(cherry picked from commit dfa8a3fe5a)
2020-11-09 12:41:59 +00:00
Nardi Ivan ba9ae589ad QUIC: improve migration support
We should keep track of CID reported in Preferred Address Transport Parameter

Close #16915


(cherry picked from commit a175435c0a)
2020-11-09 07:46:56 +00:00
Nardi Ivan 6988aad8b6 STUN: fix heuristic over TCP
STUN heuristic over TCP (added in 770872790d) doesn't handle multiple
STUN messages in the same TCP payload.

While at it, added a comment (forgotten in 354bbbe7cb) about different
TURN channel support among STUN versions


(cherry picked from commit 905f304d54)
2020-11-05 20:03:54 +00:00
Jaap Keuter b387f0c4db giop: free the buffer where its at
Followup on commit 40ce72f1a8


(cherry picked from commit 57b6666920)
2020-11-05 17:04:34 +00:00
Jaap Keuter 30ca9a975e giop: don't use packet scope for allocating a buffer at init time
Followup on commit 2c2ee172eb
Also when reading in lines from the file don't use packet scope.

Fixes #16984


(cherry picked from commit 40ce72f1a8)
2020-11-05 16:26:35 +00:00
Pau Espin a00ac1eb9c rlcmac: Handle properly LI=0 in GPRS data blocks and identify spare bits
The previous handling of LI=0 was a confusion with the LI=0 meaning from
EGPRS (see TS 44.060 B.8.2 Example 2) data block.


(cherry picked from commit 9d5de22a88)
2020-11-05 08:40:31 +00:00
Huang Qiangxiong b97332b12e Protobuf: fix bug about parsing negative enum value number
Change PT_DECIMALLIT, PT_OCTALLIT and PT_HEXLIT tokens to uint64
type, and make PT_IDENT excluding '-' numbers which will be parsed
in protobuf_lang.y. That negative enum number and number type of
constant can be correctly parsed.
Note, intLit is uint32 for parsing fieldNumber and enumNumber,
but might be uint64 as constant.

close #16988


(cherry picked from commit 1fff3cb106)
2020-11-05 08:12:00 +00:00
John Thacker 4e0dbcbc97 Encodings: Add FT_STRINGZ support for GB18030, EUC-KR
(cherry picked from commit abf3eaace8)
2020-11-05 05:36:40 +00:00
Guy Harris 99238a0198 giop: don't use packet scope for allocating a buffer at init time.
You can't use packet scope if you're not dissecting a packet;
read_IOR_strings_from_file() is called from giop_init(), which is called
when a file is opened, not when dissecting a packet.

Use NULL as the scope, which just does a regular allocation, and free
the buffer when we're done.

Expand a comment to indicate that using dissection routines is *also* a
bad idea in code that's not used when dissecting packets.

Fixes #16984.


(cherry picked from commit 2c2ee172eb)
2020-11-05 01:14:26 +00:00
Alexis La Goutte 5cac5d3254 QUIC: Fix typo
Reported by Martin Thomson


(cherry picked from commit ad1cf5eeb0)
2020-11-04 21:56:19 +00:00
Orgad Shaneh 2533f666a9 ACDR: Fix dissection of control packets
The recorded protocol on this case is eth and not ip.
2020-11-04 07:12:09 +00:00
Dr. Lars Völker 4d7b07dfe4 SOME/IP: Cleanup of length field parsing (BUG FIX)
This patch makes the parsing of length fields consistent by moving them
below their parent element and adjusting the length of the parent
element. And it fixes some problems by doing this.

Problems fixed by this:
- Bytes skipped after dynamic length arrays. This resolves #16951
- A byte was ignored before unparsed payload.
- Unions not marking the correct byte range.
- String having the length field twice.

Signed-off-by: Dr. Lars Völker <lars.voelker@technica-engineering.de>


(cherry picked from commit 9ac8dcb3a1)
2020-11-03 08:45:04 +00:00
Uli Heilmeier 15f52841ca RTCP: Extended Reports: check for padding
Check if padding flag is set and alter length accordingly.
Display rtcp.xr.bl the same way as rtcp.length.

Fixes: wireshark/wireshark#16933


(cherry picked from commit e07bb433b2)
2020-11-01 20:54:18 +00:00
Nardi Ivan daca140dfe QUIC: fix connection lookup for Version Negotiation packets
VN packets don't have any real packet type, even if they have a long header


(cherry picked from commit 9613c943e0)
2020-11-01 09:13:32 +00:00
Nardi Ivan b46c3e2537 QUIC: allow dissection of sessions forcing version negotiation
Right now, these sessions are not dissected as QUIC, let alone decrypted


(cherry picked from commit cafdab3967)
2020-10-31 16:14:42 +00:00
Sylvain Munaut 78ac817a84 usbvideo: Fix dissection of PROBE infos structure
Refer to USB Device Class Definition for Video Devices
document revision 1.5.

 * bmFramingInfo is 1 byte
 * Cut & Paste error for bMaxVersion label

Change-Id: Ib1221886f864a6ab9dbab70a8e5fca6482bf4267
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>


(cherry picked from commit b6222766cc)
2020-10-31 13:44:32 +00:00
Martin Mathieson 006537ad22 GSM A: Uncertainty speed is only 1 byte.
(cherry picked from commit b925734fe2)
2020-10-31 13:18:25 +00:00
Gerald Combs 26a0ee2c4b 3.4.0 → 3.4.1. 2020-10-29 14:10:55 -07:00
Vadim Yanitskiy 731f847342 GSM A RR: fix wrong cause value in gsm_a_rr_RR_cause_vals
Also, take a chance to correct the comment: section 6.11.0 does
not exit in 3GPP TS 44.018.  In version 15.4.0 Release 15 of
the referenced document it is 10.5.2.31 (table 10.5.2.31.1).


(cherry picked from commit 732591237b)
2020-10-29 10:36:53 +00:00
Jonas Falkevik 34b41729f9 lcsap: fix decode of plmnIdentity
Corretly decode MNC if it consists of 3 digits
Change to what is called big endinan MNC

   8   7   6   5   4   3   2   1
 +---+---+---+---+---+---+---+---+
 |  MCC digit 2  |  MCC digit 1  |  octet x
 +---------------+---------------+
 |    Filler     |  MCC digit 3  |  octet x+1
 +---------------+---------------+
 |  MNC digit 2  |  MNC digit 1  |  octet x+2
 +---------------+---------------+

 MNC of length 3:

   8   7   6   5   4   3   2   1
 +---+---+---+---+---+---+---+---+
 |  MCC digit 2  |  MCC digit 1  |  octet x
 +---------------+---------------+
 |  MNC digit 1  |  MCC digit 3  |  octet x+1
 +---------------+---------------+
 |  MNC digit 3  |  MNC digit 2  |  octet x+2
 +---------------+---------------+

From 3GPP TS 29.171
7.4.27 PLMN Identity

- digits 0 to 9, encoded 0000 to 1001,
- 1111 used as filler digit, two digits per octet,

- bits 4 to 1 of octet n encoding digit 2n-1
- bits 8 to 5 of octet n encoding digit 2n

The Selected PLMN identity consists of 3 digits from MCC followed by either
- a filler digit plus 2 digits from MNC (in case of 2 digit MNC) or
- 3 digits from MNC (in case of a 3 digit MNC).


(cherry picked from commit 156f9e81fc)
2020-10-29 10:07:09 +00:00
Huang Qiangxiong 1d6de11c49 Protobuf: fix bugs about field subdissector
Don't try to dissect bytes as string and show its value item if the
bytes field has a subdissector. And add field subdissector under field
item instead of value item.

close #16956


(cherry picked from commit 1c5d577d63)
2020-10-29 00:02:08 +00:00
Jaap Keuter a4213f2c4f Create protocols to the end of the TVB if length unknown upfront
Creating protocols with unknown length must be created to the end of the TVB
first and reined back using proto_set_len() once the length becomes known.
Not doing so can make indentification of problems harder and prevents analysis
engines like MATE from properly processing the generated protocol trees.
With this change the remaining offending dissectors are corrected for this.

Closes #16961


(cherry picked from commit 918db88055)
2020-10-28 14:38:33 +00:00
Stig Bjørlykke d28275c397 lte-rrc: Pluralize PagingRecord(s)
(cherry picked from commit edd71daa90)
2020-10-28 13:38:14 +00:00
Dieter Dobbelaere 13d0b4e400 Fix typo: 'descriptionfor' -> 'description for'.
(cherry picked from commit 7c9eb8b235)
2020-10-28 11:03:53 +00:00
Guy Harris 928f32e85c Add a new record type REC_TYPE_SYSTEMD_JOURNAL.
Systemd journal entries aren't file-type-specific; they're found in both
systemd journal entry blocks in pcapng files and in systemd journal
export files.  Give it a record type, for use with both file types.

This fixes #16955.

It also means that you can open a systemd journal export file and save
it as a pcapng file.


(cherry picked from commit 889e0d5cb6)
2020-10-28 04:16:42 +00:00
Stig Bjørlykke ab41153f22 AT: Handle response without leading \r\n
The AT response may not contain a leading \r\n, so avoid checking
for this to determine if it's a response. This characters will be
removed as a part of white space removal anyway.


(cherry picked from commit 5413331ed3)
2020-10-27 07:46:53 +00:00
Gerald Combs 74eeba5787 USB HID: Initialize a struct.
Initialize a variable caught by Valgrind. Fixes #16938.


(cherry picked from commit 273eb06390)
2020-10-25 09:32:30 +00:00
Gerald Combs eff9f0fb0d Initialize release-3.4.
Initialize the release-3.4 branch.
2020-10-22 11:38:47 -07:00
Stig Bjørlykke 10e6cb5f37 wslua: Make pinfo.p2p_dir writable
Make pinfo.p2p_dir writeble from Lua to be able to set the direction
for sub-dissectors.
2020-10-22 14:18:58 +00:00
robionekenobi f267a0433d packet-mq: Improve and fix bugs
Improve MultiSegment display
Fix Option (endianess) in MQCLOSE
Add missing parsing for Q_MGR_STATUS_ATTRS
Some minor code reformatting
2020-10-22 12:04:27 +00:00
George Hopkins e16ef82d7c Elasticsearch: support for version >= 5 2020-10-22 08:23:10 +00:00