Wireshark crashes if a 64 bit field of type BASE_CUSTOM is applied as a column
Summary
Wireshark crashes with
Unhandled exception ("field drbd.nodes_to_reach is a 64-bit field with a 32-bit value_string", group=1, code=6)
Aborted (core dumped)
when the field drbd.nodes_to_reach
is applied as a column.
Steps to reproduce
- Open P_TWOPC_PREPARE.pcap with wireshark
- Expand the DRBD packet tree
- Right click the
nodes_to_reach
field and "Apply as column"
What is the current bug behavior?
Wireshark crashes.
What is the expected correct behavior?
A column is added with the nodes_to_reach
value.
Sample capture file
Build information
Current master fe9b1fb1.
Analysis
My initial assumption was that the issue is in the DRBD dissector. However, there are other dissectors with FT_UINT64, BASE_CUSTOM
, so this seems to be a valid combination.
Simply removing the REPORT_DISSECTOR_BUG
from hf_try_val64_to_str
fixes the issue. I don't know the wireshark internals well enough to judge whether this is an acceptable fix. See
https://gitlab.com/wireshark/wireshark/-/blob/fe9b1fb103c1a4ec14b952e36e86915d6d14097e/epan/proto.c#L9467