Wireshark-bugs: [Wireshark-bugs] [Bug 12660] New: Fuzzed PCAP causing long runtime in rlc_decode
Date: Mon, 25 Jul 2016 06:57:15 +0000
Bug ID 12660
Summary Fuzzed PCAP causing long runtime in rlc_decode_li
Product Wireshark
Version 2.0.2
Hardware x86
OS Ubuntu
Status UNCONFIRMED
Severity Major
Priority Low
Component Dissection engine (libwireshark)
Assignee bugzilla-admin@wireshark.org
Reporter antti.levomaki@gmail.com

Created attachment 14758 [details]
Sample PCAP

Build Information:
TShark (Wireshark) 2.0.2 (SVN Rev Unknown from unknown)

Copyright 1998-2016 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with libpcap, with POSIX capabilities (Linux), with libnl 3,
with libz 1.2.8, with GLib 2.48.0, with SMI 0.4.8, with c-ares 1.10.0, with Lua
5.2, with GnuTLS 3.4.10, with Gcrypt 1.6.5, with MIT Kerberos, with GeoIP.

Running on Linux 4.4.0-22-generic, with locale en_GB.UTF-8, with libpcap
version
1.7.4, with libz 1.2.8, with GnuTLS 3.4.10, with Gcrypt 1.6.5.
Intel Core Processor (Haswell) (with SSE4.2)

Built using gcc 5.3.1 20160407.

--
Fuzzed PCAP takes 100% CPU and runs for a long time on tshark 2.0.2 and a
recent build from repository ( commit 688d055acd523e645c1e87267dcf4a0a9867adbd
).

GDB backtrace from 'tshark -2 -V -r <pcap>' aborted after running for a while:

Program received signal SIGABRT, Aborted.
0x00007ffff45bb676 in rlc_decode_li (mode=RLC_AM, tvb=0x9342c0, pinfo=0xb04c18,
tree=0x0, li=0x7fffffffbab0, max_li=16 '\020', li_on_2_bytes=0) at
packet-rlc.c:1722
1722            next_bytes = li_on_2_bytes ? tvb_get_ntohs(tvb, hdr_len) :
tvb_get_guint8(tvb, hdr_len);
123 tomb gdb execution "thread apply all bt" 321

Thread 1 (Thread 0x7ffff7fb9740 (LWP 1578)):
#0  0x00007ffff45bb676 in rlc_decode_li (mode=RLC_AM, tvb=0x9342c0,
pinfo=0xb04c18, tree=0x0, li=0x7fffffffbab0, max_li=16 '\020', li_on_2_bytes=0)
at packet-rlc.c:1722
#1  0x00007ffff45bde04 in dissect_rlc_am (channel=RLC_UL_DCCH, tvb=0x9342c0,
pinfo=0xb04c18, top_level=0x0, tree=0x0, atm=0x0) at packet-rlc.c:2308
#2  0x00007ffff45be82a in dissect_rlc_dcch (tvb=0x9342c0, pinfo=0xb04c18,
tree=0x0, data="" at packet-rlc.c:2477
#3  0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffedb08f50,
tvb=0x9342c0, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#4  0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffedb08f50,
tvb=0x9342c0, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1, data="" at
packet.c:735
#5  0x00007ffff3cadd25 in call_dissector_only (handle=0x7fffedb08f50,
tvb=0x9342c0, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2791
#6  0x00007ffff3cadd68 in call_dissector_with_data (handle=0x7fffedb08f50,
tvb=0x9342c0, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2804
#7  0x00007ffff47e7679 in dissect_mac_fdd_dch (tvb=0xb0ac50, pinfo=0xb04c18,
tree=0x0, data="" at packet-umts_mac.c:564
#8  0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffedb13b70,
tvb=0xb0ac50, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#9  0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffedb13b70,
tvb=0xb0ac50, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1, data="" at
packet.c:735
#10 0x00007ffff3cadd25 in call_dissector_only (handle=0x7fffedb13b70,
tvb=0xb0ac50, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2791
#11 0x00007ffff3cadd68 in call_dissector_with_data (handle=0x7fffedb13b70,
tvb=0xb0ac50, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2804
#12 0x00007ffff47dab2e in dissect_tb_data (tvb=0xb0ac00, pinfo=0xb04c18,
tree=0x0, offset=3, p_fp_info=0x7fffeca74180, data_handle=0x7ffff7aae8e8
<mac_fdd_dch_handle>, data="" at packet-umts_fp.c:815
#13 0x00007ffff47decbb in dissect_dch_channel_info (tvb=0xb0ac00,
pinfo=0xb04c18, tree=0x0, offset=3, p_fp_info=0x7fffeca74180, data="" at
packet-umts_fp.c:2557
#14 0x00007ffff47e476e in dissect_fp_common (tvb=0xb0ac00, pinfo=0xb04c18,
tree=0x0, data="" at packet-umts_fp.c:4419
#15 0x00007ffff47e4add in dissect_fp (tvb=0xb0ac00, pinfo=0xb04c18, tree=0x0,
data="" at packet-umts_fp.c:4507
#16 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffeda51580,
tvb=0xb0ac00, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#17 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffeda51580,
tvb=0xb0ac00, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1, data="" at
packet.c:735
#18 0x00007ffff3cadd25 in call_dissector_only (handle=0x7fffeda51580,
tvb=0xb0ac00, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2791
#19 0x00007ffff3c99819 in try_conversation_dissector (addr_a=0xb04cf0,
addr_b=0xb04cd8, ptype=PT_UDP, port_a=65359, port_b=8040, tvb=0xb0ac00,
pinfo=0xb04c18, tree=0x0, data="" at conversation.c:1323
#20 0x00007ffff47d3839 in decode_udp_ports (tvb=0x848b70, offset=8,
pinfo=0xb04c18, tree=0x0, uh_sport=8040, uh_dport=65359, uh_ulen=3554) at
packet-udp.c:541
#21 0x00007ffff47d5e21 in dissect (tvb=0x848b70, pinfo=0xb04c18, tree=0x0,
ip_proto=17) at packet-udp.c:1080
#22 0x00007ffff47d5e79 in dissect_udp (tvb=0x848b70, pinfo=0xb04c18, tree=0x0,
data="" at packet-udp.c:1086
#23 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffedb13330,
tvb=0x848b70, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#24 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffedb13330,
tvb=0x848b70, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:735
#25 0x00007ffff3cab583 in dissector_try_uint_new (sub_dissectors=0x7b1cc0,
uint_val=17, tvb=0x848b70, pinfo=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:1199
#26 0x00007ffff425e409 in ip_try_dissect (heur_first=0, tvb=0x848b70,
pinfo=0xb04c18, tree=0x0, iph=0x7fffec869030) at packet-ip.c:1977
#27 0x00007ffff426037c in dissect_ip_v4 (tvb=0x848b20, pinfo=0xb04c18,
parent_tree=0x0, data="" at packet-ip.c:2476
#28 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffedb78930,
tvb=0x848b20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#29 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffedb78930,
tvb=0x848b20, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1, data="" at
packet.c:735
#30 0x00007ffff3cab583 in dissector_try_uint_new (sub_dissectors=0x73c040,
uint_val=2048, tvb=0x848b20, pinfo=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:1199
#31 0x00007ffff3cab5e4 in dissector_try_uint (sub_dissectors=0x73c040,
uint_val=2048, tvb=0x848b20, pinfo=0xb04c18, tree=0x0) at packet.c:1225
#32 0x00007ffff40a1c60 in dissect_ethertype (tvb=0xb03d20, pinfo=0xb04c18,
tree=0x0, data="" at packet-ethertype.c:262
#33 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffeda50000,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#34 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffeda50000,
tvb=0xb03d20, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:735
#35 0x00007ffff3cadd25 in call_dissector_only (handle=0x7fffeda50000,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2791
#36 0x00007ffff3cadd68 in call_dissector_with_data (handle=0x7fffeda50000,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2804
#37 0x00007ffff40a04d5 in dissect_eth_common (tvb=0xb03d20, pinfo=0xb04c18,
parent_tree=0x0, fcs_len=-1) at packet-eth.c:540
#38 0x00007ffff40a106b in dissect_eth (tvb=0xb03d20, pinfo=0xb04c18, tree=0x0,
data="" at packet-eth.c:836
#39 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffedb5c7a0,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#40 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffedb5c7a0,
tvb=0xb03d20, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1, data="" at
packet.c:735
#41 0x00007ffff3cab583 in dissector_try_uint_new (sub_dissectors=0x73c2c0,
uint_val=1, tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:1199
#42 0x00007ffff40e9887 in dissect_frame (tvb=0xb03d20, pinfo=0xb04c18,
parent_tree=0x0, data="" at packet-frame.c:507
#43 0x00007ffff3caa711 in call_dissector_through_handle (handle=0x7fffeda51950,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:660
#44 0x00007ffff3caa8a2 in call_dissector_work (handle=0x7fffeda51950,
tvb=0xb03d20, pinfo_arg=0xb04c18, tree=0x0, add_proto_name=1,
data="" at packet.c:735
#45 0x00007ffff3cadd25 in call_dissector_only (handle=0x7fffeda51950,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2791
#46 0x00007ffff3cadd68 in call_dissector_with_data (handle=0x7fffeda51950,
tvb=0xb03d20, pinfo=0xb04c18, tree=0x0, data="" at packet.c:2804
#47 0x00007ffff3caa079 in dissect_record (edt=0xb04c00, file_type_subtype=1,
phdr=0xad68c0, tvb=0xb03d20, fd=0x7fffffffd550, cinfo=0x0) at packet.c:543
#48 0x00007ffff3c9ebf9 in epan_dissect_run (edt=0xb04c00, file_type_subtype=1,
phdr=0xad68c0, tvb=0xb03d20, fd=0x7fffffffd550, cinfo=0x0) at epan.c:365
#49 0x000000000041844c in process_packet_first_pass (cf=0x64f100 <cfile>,
edt=0xb04c00, offset=20928, whdr=0xad68c0, pd=0xb04e20
"4\a\373\024t,\320\320\375+\004\300\b") at tshark.c:2694
#50 0x0000000000418dd7 in load_cap_file (cf=0x64f100 <cfile>, save_file=0x0,
out_file_type=2, out_file_name_res=0, max_packet_count=-1, max_byte_count=0) at
tshark.c:2988
#51 0x0000000000416fa0 in main (argc=5, argv=0x7fffffffdda8) at tshark.c:1873


You are receiving this mail because:
  • You are watching all bug changes.