Commit Graph

81326 Commits

Author SHA1 Message Date
Clément Notin 5b248ac4d0 ldap: Add Active Directory OIDs
From [MS-ADTS] specification
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/3c5e87db-4728-4f29-b164-01dd7d7391ea
2021-06-30 05:15:41 +00:00
Guy Harris 689ff5a3ad pcapng: centralize access to members of the wtap_optval_t union.
Have the "compute option size" and "write option" routines take a
wtap_optval_t * as an argument and choose the appropriate member of the
union.
2021-06-29 14:54:48 -07:00
Gerald Combs ef180c1be6 GitLab CI: Add a "merged" rule for dedicated runners.
We have to use dedicated runners for Windows builds, so create a
separate "if-merged" rule for them which includes only the
wireshark/wireshark repository.
2021-06-29 19:32:51 +00:00
Prince Paul 06aa393df5 ASTERIX: Fix length of I010_042_X and I010_042_Y
I010/042 is Four-octet fixed length with 2 bytes for X and 2 bytes for
Y.
Refer SUR.ET1.ST05.2000-STD-07-01 Edition 1.1 page 19.
2021-06-29 19:11:22 +00:00
Chuck Craft 1caa05116b docs: wireshark-filter - update man page 2021-06-29 18:00:59 +00:00
Chuck Craft 820faa1777 docs: wireshark-filter - update man page 2021-06-29 18:00:59 +00:00
João Valverde 4124986a9c wslog: Prefer more modern time APIs
Functions clock_gettime() and timespec_get() cover all the platforms
we support with sub-second resolution in a a portable manner. Fallback
to using time().

Pass a struct timespec to the log writer callback for maximum
flexibility.
2021-06-29 14:19:55 +00:00
Joakim Karlsson 1329081379 MP2T: fix might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 2021-06-29 09:49:20 +02:00
Joakim Karlsson d2c91439df NAS-5GS: handle of n1SmInfo(From/To)Ue 2021-06-29 04:11:36 +00:00
Guy Harris c0dc9106dd pcapng: clean up some function names.
Consistently use pcapng_compute_XXX_option_size() for routines to
compute the size of an option of type XXX and pcapng_write_XXX_option()
for routins to write out an option of type XXX.

Sort the routines by the order in which their option type values are
defined.
2021-06-28 17:20:26 -07:00
Guy Harris 73e058032f pcapng: have more common code for writing options.
Have common routines that iterate over all the options, processing
comment and custom options in common code (as they're defined
independently of particular block types), with callbacks to handle the
options for particular block types.
2021-06-28 15:14:36 -07:00
Guy Harris ad3e6b1be6 wireless timeline: add a destructor to free the hash table.
Destroy the hash table if we're destroying the timeline widget, so that
it doesn't leak.
2021-06-28 14:18:41 -07:00
Nardi Ivan f6be02cd8d QUIC: explicitly show stream initiator and direction
See: https://datatracker.ietf.org/doc/html/rfc9000#section-2.1
2021-06-28 19:11:59 +00:00
Moshe Kaplan ebb8703a50 Wirehark Windows: Harden build with Shadow Stack and EHCONT metadata
Compile and link with the /CETCOMPAT and /guard:ehcont flags
on supported versions of Visual Studio
2021-06-28 16:37:11 +00:00
Anders Broman 58ada8b529 NGAP: Catch dissection of containers that may be test data.
In test environments the octet stering may be filled with junk data.
2021-06-28 16:04:19 +00:00
Thomas Dreibholz 1c40f936e2 Using col_append_sep_fstr() instead of prepending "NetPerfMeter" label. 2021-06-28 14:39:04 +00:00
Thomas Dreibholz f4c48c5350 NetPerfMeter display improvement:
Prepend protocol name "NetPerfMeter" with col_prepend_fence_fstr(), instead of
overwriting the underlying Transport Layer protocol name.
2021-06-28 14:39:04 +00:00
Joakim Andersson 9728438929 nordic_ble: Update display name of nordic_ble dissector
Replace all instances of "Nordic BLE Sniffer" with
"nRF Sniffer for Bluetooth LE" which is the name used by
nordic semiconductor for the development tool on the homepage.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-28 11:52:14 +00:00
Nardi Ivan 32d97e2757 Qt: Follow: fix two memory leaks 2021-06-28 11:29:21 +00:00
Thomas Dreibholz 8e256b7e69 Bugfix for S101 dissector:
Make sure that the packet has an S101 header, before setting the protocol name
with col_set_str(). Otherwise, all TCP packets on port 9000 may be
misidentified as S101 packets.
2021-06-28 11:12:59 +00:00
Dario Lombardo b034473cb2
github: update windows action.
The target user_guide_chm has been replaced by user_guide_html
in 6bfab69d14, but the action hasn't been updated accordingly.
2021-06-28 12:53:38 +02:00
Guy Harris 693a02e760 wireless_timeline: make sure the hash table is always allocated.
At least on my Mac, if I start up Wireshark, start a capture
(non-monitor-mode) on the Wi-Fi adapter, add a comment to the SHB and
the first packet while it's capturing, stop the capture, and try to save
it, it warns that the wireless timeline hash table pointer is null.

Allocate it in the constructor.
2021-06-28 09:36:54 +00:00
Martin Mathieson 20491ae1d6 ESP: Free error string on UAT copy
CID: 1477519
2021-06-28 10:12:53 +01:00
Guy Harris c125236e57 wslog: don't assume how big struct timeval's tv_usec is.
At least according to the Single UNIX Standard, it merely has to be big
enough to hold a value in the range [-1, 1000000], and there must be
*an* environment in which it's no *larger* than a long.

Just cast it to long, and continue to print the result of dividing it by
1000 with %03ld.
2021-06-28 07:59:33 +00:00
Dr. Matthias St. Pierre 1e04fb3001 ipsec: calculate and verified the AEAD ICV only if enabled
AEAD ciphers should behave in the same way as the classical
cipher+hmac methods: the ICV should be calculated and verified
if the user has enabled the authentication check in the ESP
protocol options.
2021-06-28 07:43:38 +00:00
Dr. Matthias St. Pierre 67dad02eb0 ipsec: fix alignment check for encrypted payload data
This commit fixes the alignment check for the encrypted payload data
which prevented the decryption of ESP packets for 'stream ciphers'
like AES-GCM and AES-CTR, and adds an error indicator to the dissection
tree in case the check fails. The encrypted payload data needs to satisfy
the following two conditions:

- The ciphertext length needs to be a multiple of the cipher block size.

- the ciphertext needs to terminate on a 4-byte boundary.
  (RFC 2406, section 2.4)
2021-06-28 07:43:38 +00:00
João Valverde 3fc5eb3f1f wslog: Replace g_date_time_format()
Calling GLib functions inside the log writer is not safe,
it might infinitely recurse or abort if g_date_time_* logs
warnings because we registered our log handler for GLib itself.
2021-06-28 00:09:30 +01:00
Guy Harris c1082bd99e wiretap: have the "for each option" routine return a success/fail indication.
Have the routine it calls return a Boolean value, with "true" meaning
"keep going" and "false" meaning "stop iterating and return a failure
indication".  If the callback routine never returns "false", the routine
returns "true" as a success indication.
2021-06-27 13:25:16 -07:00
Gerald Combs 695b4c5bee [Automatic update for 2021-06-27]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-27 17:12:48 +00:00
Guy Harris ae10f11212 wtap_opttypes: clean up comments. 2021-06-27 04:27:59 -07:00
Guy Harris 9e6aa424f1 pcapng: have a common routine to write the "end of options" option. 2021-06-27 03:14:14 -07:00
Pascal Quantin fa21433c35 Windows: upgrade Npcap to 1.50 2021-06-26 13:16:49 +02:00
Pascal Quantin 029a7fcec5 DNP: use the proper free function
g618661b22e introduced a free for a so called memory leak (which wasn't
a real leak due to the pinfo->pool garbage collector) but used the wrong
free function. Let's keep the explicit free but use the right function.

Closes #17462
2021-06-26 10:31:59 +02:00
João Valverde ceedd7b334 wslog: Update API documentation and improve code formatting 2021-06-26 00:44:23 +01:00
João Valverde c6a920686c wslog: Check environment initialization for errors
Initialiaze the cmdarg error stream earlier.

Dumpcap also needs to know earlier if it is running in capture
child mode.
2021-06-26 00:18:26 +01:00
João Valverde c2c256f0d8 wslog: Fatal messages should always be active 2021-06-26 00:18:26 +01:00
João Valverde 472eaf911b "config.h" need not and should not be included in any header
config.h is included in the source file before including the
header that uses it.
2021-06-25 23:53:53 +01:00
João Valverde 7aae691f7d wsutil: Rewrite ws_assert() to minimize dependencies
This includes as little as possible in the assertion header, so
that it can be included globally in every file without pulling
any unwanted definitions. In particular pulling stdlib.h is
avoided because that can have side effects if it wants to
include non-portable extensions.

It is possible to have side-effects from include glib.h too, for
example because of G_LOG_DOMAIN.

These side-effects are usually avoidable with careful ordering
of pre-processor directives but with multiple levels of indirections
it can be hard to track. Better to make it robust to these kinds
of failures in the first place.

Also integrate with our logger for a cohesive experience (but
keep it a private dependency).
2021-06-25 22:06:32 +00:00
João Valverde 53704fb971 wsutil: Rewrite ws_log() to minimize dependencies
Minimizing the dependencies on other wsutil and GLib functions
reduces the chance that we will have a weird recursion pattern
in wslog and makes the code easier to analyze.
2021-06-25 22:06:32 +00:00
João Valverde 3fb7a6e0d5 checkAPIs: __func__ is now part of C99, allow it 2021-06-25 22:06:32 +00:00
Guy Harris 11d4da9ef6 fpp: get rid of variable with a name that a C function once had.
I'm not sure in what OSes we'd get the really old name for strchr(),
index(), defined, causing compiler whining about a local variable
shadowing a function declaration, but the source checking script
complains about it, so use the name offset instead (that's the name
typically used for offsets into a tvbuff).
2021-06-25 14:25:10 -07:00
Vasil Velichkov 6783ca027e Skip two protobuf dissector tests when LUA is not available
Both tests are using LUA scripts and both fails when it is not avialble.
2021-06-25 12:29:14 +00:00
Martin Mathieson bbcd42be87 Snort config: Avoid leaks when fail to open config file.
CID: 1477713
CID: 1477850
2021-06-25 11:50:24 +00:00
Joakim Andersson 72d331cfdc btle: Fix parsing of empty extendend advertising header
Fix parsing of extended advertising when the extended advertising header
is empty. The flag field is excluded when none of the fields are present
and the extended header length field is 0.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-25 11:34:17 +00:00
Joakim Andersson 23d3e0bdde btle: Fix parsing of CTE Info field in extended advertising header
Fix parsing of the CTE Info field in the extended advertising header.
The bit-mask of the different fields was wrongly placed.
The text of the different fields all said "CTE Info".
The CTE Time field was added twice.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-25 11:34:17 +00:00
Martin Mathieson af57fb94ac DT2000: Fix buffer length in wiretap code
CID: 1477941
2021-06-25 09:44:35 +01:00
João Valverde 129046b518 wsutil: Fix incorrect header include
wsutil should not have any dependency on epan, replace the
extraneous header.
2021-06-25 03:14:22 +00:00
Peter Wu a7ef7ff40d CMake: clear stale MaxMindDB cache entries if needed
On macOS with Homebrew, the version is included with the library path.
On updates, the old MAXMINDDB_LIBRARY is invalidated. However
ws_find_package only checks MaxMindDB_LIBRARY. Windows has a similar
problem. Make sure to clear the stale value such that newer versions can
be found, fixing the build.

Fixes #17069
2021-06-24 22:55:50 +00:00
John Thacker 16d9f8948c MP2T: Conversation direction matters for analysis stats
In the fairly rare case where we have multiple MP2T streams in
opposite directions on the same UDP (or other) conversation, keep
their analysis stats and assigned fragment IDs separate. Otherwise
the fragment IDs will be incremented at the wrong time and reassembly
will fail in edge cases.
2021-06-24 20:56:43 +00:00
Dr. Matthias St. Pierre 3ce390a8f9 ipsec: display the encryption and authentication algorithm names 2021-06-24 20:39:20 +00:00