Commit Graph

45861 Commits

Author SHA1 Message Date
Matan Perelman 15b3deff27 lapdm: Fix reused fragment id reassembly
Fixes #18676
2022-11-23 15:48:22 +00:00
John Thacker 26dda2ba78 H264, H265: Fix overflow value of se(v)
For signed exponential Golomb, fix a typo when testing if
value was even or odd that resulted in a no-op. This was
mapping all overflows to G_MININT32 instead of half of them
to G_MAXINT32.
2022-11-23 14:47:01 +00:00
John Thacker e6d81e8731 ANSI IS-637 A: Use tvb_new_octet_aligned for addresses
Use tvb_new_octet_aligned when adding addresses (strings or bytes)
that are not byte aligned. That is not only clearer code, but also
prevents attempting to add unvalidated strings.

Since we're aligning the fields properly, get rid of the extra
fields for the MSB of the first field and LSB of the last field.

Fix #18664
2022-11-23 07:01:19 -05:00
Richard Sharpe b8a50617d7 ieee80211: Fix an CLang warning about dead code in my recent MR. 2022-11-23 07:10:27 +00:00
Martin Mathieson 793365d0e0 Fix some issues seen with cppcheck 2022-11-22 20:55:24 +00:00
John Thacker ec353e89f3 SIP: Extract entire Call-ID without truncating
RFC 3261 does not put a limit on the maximum size of Call-ID.
(Some implementations do, such as at 256 bytes.) Truncating
it can produce invalid UTF-8 if there's also errors that
turn into UTF-8 replacement characteres.

A reduced size is still used for the hash table lookup.

Add an expert info warning if Call-ID is missing, as it's
a mandatory field.

Fix #18620.
2022-11-22 16:21:42 +00:00
Alexis La Goutte 6dcfb07b7d BGP: Fix (reader_)offset for IGMP
fix typo (offset => reader_offset)

Close #18660
2022-11-22 13:04:18 +00:00
Martin Gallo fdc211984f SAPMS: Added SAP MS as main dissector 2022-11-22 09:27:10 +00:00
Martin Gallo 82b5201f79 SAPRouter: Added SAP Router as main dissector 2022-11-21 15:01:59 +00:00
Richard Sharpe 43fb308437 Zieee80211: Provide compressed feedback matrices for VHT as well as HE.
!18574
2022-11-21 03:37:07 +00:00
Richard Sharpe ee4703094f ieee80211: Beamforming fixes 2022-11-21 03:37:07 +00:00
John Thacker 06b4a84901 XNAP: Use bitmask for E-UTRA and NR cell identities
Instead of using tvb_get_bits and proto_tree_add_uint,
use a bitmask in the field info and proto_tree_add_item.

This means that when epan/print.c writes PDML or JSON,
the value written is the correctly masked value (PDML also
includes the unmasked value.)

When proto_tree_add_uint is used, the value written to
PDML and JSON is the original value from the packet buffer,
not properly shifted.
2022-11-21 00:57:12 +00:00
John Thacker b10e26d742 NGAP: Use bitmask for NRCellIdentity and EUTRACellIdentity
Using a bitmask in the field definition allows us to use
proto_tree_add_item, which means that when print.c writes
PDML and JSON, the value written is the correctly masked
value (PDML also includes the unmasked value.)

When functions like proto_tree_add_uint are used instead,
the value written to PDML and JSON is the original value
from the packet buffer, not properly shifted.
2022-11-20 23:57:12 +00:00
Gerald Combs f9e0e555e0 [Automatic update for 2022-11-20]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-11-20 16:46:55 +00:00
John Thacker 09914cca33 S1AP: Use bitmask for cellIdentity
Instead of using tvb_get_bits32 and proto_tree_add_uint,
use a bitmask in the field info and proto_tree_add_item.

This means that when epan/print.c writes PDML or JSON,
the value written is the correctly masked value (PDML also
includes the unmasked value.)

When proto_tree_add_uint is used, the value written to
PDML and JSON is the original value from the packet buffer,
not properly shifted.
2022-11-20 12:56:08 +00:00
John Thacker 92208e4330 HTTP2: Ensure that the unescaped header value is valid encoding
It's possible, in the case of errors, for the result of
g_uri_unescape_string not to be valid UTF-8, either if originally
some other encoding was percent-encoded, or if there were errors.
Check for it.

Fix #18658.
2022-11-20 11:44:39 +00:00
João Valverde 79c3a77752 Add macros to control lemon diagnostics
Rename flex macros using parenthesis (mostly a style issue):

DIAG_OFF_FLEX -> DIAG_OFF_FLEX()
DIAG_ON_FLEX  -> DIAG_ON_FLEX()

Use the same kind of construct with lemon generated code using
DIAG_OFF_LEMON() and DIAG_ON_LEMON(). Use %include and %code
directives to enforce the desired order with generated code
in the middle in between pragmas.

Fix a clang-specific pragma to use DIAG_OFF_CLANG().

DIAG_OFF(unreachable-code) -> DIAG_OFF_CLANG(unreachable-code).

Apparently GCC is ignoring the -Wunreachable flag, that's why
it did not trigger an unknown pragma warning. From [1}:

  The -Wunreachable-code has been removed, because it was unstable: it
  relied on the optimizer, and so different versions of gcc would warn
  about different code.  The compiler still accepts and ignores the
  command line option so that existing Makefiles are not broken.  In some
  future release the option will be removed entirely. - Ian

[1] https://gcc.gnu.org/legacy-ml/gcc-help/2011-05/msg00360.html
2022-11-20 10:11:27 +00:00
João Valverde f3a96bc18c IAX2: Fix UTF-8 string encoding
Fixes #18651.
2022-11-18 11:32:13 +00:00
John Thacker 8037ecf93f mip6: Use ENC_APN_STR 2022-11-18 10:59:19 +00:00
João Valverde 45c15019ac AT: Fix UTF-8 string encoding
Fixes #18650.
2022-11-18 10:11:00 +00:00
João Valverde 6bc87f01da T.30: Fix UTF-8 encoding
Fixes #18649.
2022-11-18 10:10:07 +00:00
Martin Mathieson 709d65883f Fix some cppcheck issues 2022-11-18 10:07:57 +00:00
John Thacker 45cc56746b aol: Token encoding
The token is a 2 character ASCII string. Treat it as such.

Fix #18616.
2022-11-17 14:22:05 +00:00
Ferry Huberts 7a29f10d6d locamation-im: restore showing the eol character in the hex dump
This got lost in b00725c945.

Showing the eol character is important to us.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-11-17 12:35:23 +00:00
Ferry Huberts 16107683c6 locamation-im: line numbers are never used for split lines, lose them
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-11-17 12:35:23 +00:00
João Valverde 2443df7318 Disable another -Wunreachable lemon warning 2022-11-17 11:21:41 +00:00
João Valverde cfbe898dcc CMake: Disable -Werror for flex generated files 2022-11-17 10:23:12 +00:00
Martin Mathieson 7efa4cb9a4 ORAN FH CUS: More changes to line up samples properly for Mod Compr 2022-11-17 09:33:42 +00:00
John Thacker b00725c945 locamation-im: Fix encoding
Add strings with proto_tree_add_item or tvb_get_string_enc;
avoid using tvb_get_raw_bytes_as_string.

Use UTF-8 as the encoding to future-proof, according to
Locomation.

Use tvb_find_line_end() to split the lines, which does almost
all the needed logic and simplifies the code.

Fix #18632
2022-11-17 03:04:48 +00:00
João Valverde 09718fb9b3 CMake: Move clang warnings
Move clang warnings to normal set. Let the CMake compatibility
check control the warning.

Fix or work-around -Wunreachable warnings in the code.
2022-11-17 01:35:16 +00:00
João Valverde 7ce4b153ae X509IF: Fix null pointer dereferencing.
Fixes #18652.
2022-11-17 01:09:07 +00:00
João Valverde c37bb02484 Regenerate ASN.1 dissectors 2022-11-17 01:08:47 +00:00
Dario Lombardo baaf60cb34
ptp: prevent divide by zero.
Check for valid values before use.

Fix: #18635.
2022-11-16 22:25:42 +01:00
João Valverde fc28bb0502 X509IF: Remove another fixed length buffer 2022-11-16 20:27:35 +00:00
João Valverde 59ee5247dc X509IF: Fix string truncation
Use a wmem_strbuf_t to avoid a truncation in the middle of a
multibyte character with a fixed length buffer.

Fixes #18543.
2022-11-16 20:27:35 +00:00
John Thacker 8fd375cfad tcp: Use correct wraparound comparison in sequence analysis
maxseqtobeacked needs to be increased when it's lower than
nextseq, not the other way around, otherwise we can get repeated
extra TCP ACKed unseen segment messages.

Since sequence analysis is always on the absolute sequence
numbers, not relative, it needs to use LT_SEQ to handle wraparound.

Fix #18558. Fix #18633.
2022-11-16 12:58:27 +00:00
Martin Mathieson 9b644f7f84 ORAN FH CUS: Start on Modulation Compression Support 2022-11-16 09:58:08 +00:00
David Perry 714ee652cd Refactor PCEP object dissection for readability 2022-11-16 08:20:40 +00:00
AndersBroman 1e5f909617 RTPProxy: Remove newlines from col info. 2022-11-16 08:15:39 +00:00
John Thacker 5396eeb578 reassemble: More fragment_seq_single issues.
Fix #18644 and Coverity CID 1516901. The add_seq_single code
really treated fragment heads and fragment items interchangeably
in several places.
2022-11-15 20:42:55 -05:00
John Thacker 03a4eed570 ppp: Check to see if process_reassembled_data gave us a tvbuffer
It's possible to have multiplexed PPP MP that occurs in several
layers in the same frame, so we need to check that we're in the
right packet and also the right layer. process_reassembled_data
does that, so check to see if it returned a tvb instead of
just checking the frame number. Prevents some DISSECTOR BUG errors
when the buffer isn't actually available.
2022-11-16 01:18:14 +00:00
David Perry 99d3112464 Show the address space of IPv6 addresses 2022-11-15 16:38:30 +00:00
Pascal Quantin 6b41ad918b PCAP: upgrade dissector to v17.0.0
In their infinite wisdom, 3GPP succeeded to make non backward compatible
ASN.1 description
Closes #18646
2022-11-15 16:04:54 +01:00
Pau Espin 37a0ccee9c GSM A-bis/OML: Show NACK cause descriptions 2022-11-15 10:23:47 +00:00
Jeremy Kerr 889e5331dc Add NVMe Management Interface (NVMe-MI) dissector
This change adds a small dissector for the NVMe-MI protocol, typically
for tunelling Administration commands over an MCTP (over I2C) channel.

We just decode the request and response headers, and leave the payload
as raw data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr baf7a3c493 Add MCTP control protocol dissector
This change adds a very basic dissector for the MCTP control protocol -
just the header fields, leaving the raw payload data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr e1cbe02cce Add Management Component Transport Protocol (MCTP) dissector
This change adds a protocol dissector for the Management Component
Transport Protocol (MCTP). This is a failry simple datagram-based
protocol for messaging between components within a single platform,
typically over I2C, serial or PCIe.

This dissector just implements the header fields, and sequence-number
based message reassembly. Inner protocols will be added as follow-up
changes.

Linux has support for AF_MCTP data, so decode from the MCTP SLL ltype.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
AndersBroman b704562c0c RTPProxy: Make column info more readable. 2022-11-15 09:29:19 +01:00
John Thacker b9a4bf297e reassembly: Fix update to the fragment_add_single functions
These used fragment_head and fragment_items indistinguishably
in a few ways. Fix up 4f3b028d94

Fix #18639. Fix #18640.
2022-11-14 21:39:16 -05:00
Martin Gallo 59fdaa7d07 SAPEnqueue: Added SAP Enqueue Server as main dissector 2022-11-14 20:35:17 +00:00