HTTP2 dissector reports an assertion error on large data frames
When analyzing gRPC traffic with large request messages, I see HTTP2 dissector assertion failures instead of properly dissected HTTP2 frames.
Steps to reproduce
Capture the traffic from making gRPC requests with large messages. Request sizes of 200KB or greater consistently trigger the error.
What is the current bug behavior?
Wireshark outputs the following in the dissection:
[Dissector bug, protocol HTTP2: C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\epan\dissectors\packet-http2.c:2768: failed assertion "!((pinfo)->fd->visited) && datalen == length"]
What is the expected correct behavior?
The dissection shows an HTTP2 data frame.
Sample capture file
In both of these files, in Preferences -> Protocol -> HTTP2, the port needs to be set to 44363.
failure.pcap captures a 200KB request and demonstrates the error.
success.pcap captures a 20KB request and demonstrates the success path.
3.4.9 (v3.4.9-0-g365e236f5efe) Compiled (64-bit) with Qt 5.15.2, with libpcap, with GLib 2.52.3, with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.15.0, with Lua 5.2.4, with GnuTLS 3.6.3 and PKCS #11 support, with Gcrypt 1.8.3, with MIT Kerberos, with MaxMind DB resolver, with nghttp2 1.39.2, with brotli, with LZ4, with Zstandard, with Snappy, with libxml2 2.9.9, with QtMultimedia, with automatic updates using WinSparkle 0.5.7, with AirPcap, with SpeexDSP (using bundled resampler), with Minizip. Running on 64-bit Windows 10 (21H1), build 19043, with Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz (with SSE4.2), with 32469 MB of physical memory, with locale English_United States.utf8, with light display mode, without HiDPI, with Npcap version 1.31, based on libpcap version 1.10.1-PRE-GIT, with GnuTLS 3.6.3, with Gcrypt 1.8.3, with brotli 1.0.2, without AirPcap, binary plugins supported (21 loaded). Built using Microsoft Visual Studio 2019 (VC++ 14.29, build 30040).