https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14480

            Bug ID: 14480
           Summary: tshark memory leaks with asan / valgrind [telnet]
                    (1/10)
           Product: Wireshark
           Version: Git
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: Major
          Priority: Low
         Component: Dissection engine (libwireshark)
          Assignee: bugzilla-ad...@wireshark.org
          Reporter: otto.air...@gmail.com
  Target Milestone: ---

Created attachment 16193
  --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16193&action=edit
file to cause memory leak

Build Information:
TShark (Wireshark) 2.5.1 (v2.5.1rc0-467-g2eb6f3b5)
Built using clang 4.2.1 Compatible Clang 3.8.0 (tags/RELEASE_380/final).

--
tshark leaking memory when executing command:

ASAN_OPTIONS='abort_on_error=1:detect_leaks=1' tshark -2 -V -r <filename>

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7f7bacc3d718 in g_malloc ??:?
    #4 0x7f7bb768a328 in wmem_memdup
/home/fuzzer/wireshark/wireshark/epan/wmem/wmem_miscutl.c:23
    #6 0x7f7bb68df1eb in alloc_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:147
    #7 0x7f7bb68df1eb in copy_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:265
    #8 0x7f7bb68df1eb in copy_address
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:275
    #10 0x7f7bb68decd6 in add_tn3270_conversation
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tn3270.c:5298
    #12 0x7f7bb68bb4e2 in check_tn3270_model
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:224
    #14 0x7f7bb68b811c in check_for_tn3270
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:234
    #15 0x7f7bb68b811c in dissect_string_subopt
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:279
    #17 0x7f7bb68b6742 in telnet_sub_option
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1686
    #18 0x7f7bb68b6742 in telnet_command
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1771
    #19 0x7f7bb68b6742 in dissect_telnet
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1899
    #21 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #23 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #25 0x7f7bb5006b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #27 0x7f7bb68647c5 in decode_tcp_ports
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5542
    #29 0x7f7bb686a4d9 in process_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5611
    #31 0x7f7bb6867124 in desegment_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3134
    #32 0x7f7bb6867124 in dissect_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5684
    #34 0x7f7bb6875800 in dissect_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:6522
    #36 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #38 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #40 0x7f7bb5006b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #42 0x7f7bb5d41501 in ip_try_dissect
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:1845
    #43 0x7f7bb5d41501 in dissect_ip_v4
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:2303
    #45 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #47 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #49 0x7f7bb50078de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #50 0x7f7bb50078de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385
    #52 0x7f7bb59c47b0 in dissect_ethertype
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ethertype.c:259
    #54 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #56 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #58 0x7f7bb5002f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #59 0x7f7bb5002f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #61 0x7f7bb59c151e in dissect_eth_common
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:526
    #63 0x7f7bb59bf087 in dissect_eth
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:801
(discriminator 3)
    #65 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #67 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7f7bacc3d718 in g_malloc ??:?
    #4 0x7f7bb768a328 in wmem_memdup
/home/fuzzer/wireshark/wireshark/epan/wmem/wmem_miscutl.c:23
    #6 0x7f7bb68df1eb in alloc_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:147
    #7 0x7f7bb68df1eb in copy_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:265
    #8 0x7f7bb68df1eb in copy_address
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:275
    #10 0x7f7bb68ded20 in add_tn3270_conversation
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tn3270.c:5301
    #12 0x7f7bb68bb4e2 in check_tn3270_model
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:224
    #14 0x7f7bb68b811c in check_for_tn3270
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:234
    #15 0x7f7bb68b811c in dissect_string_subopt
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:279
    #17 0x7f7bb68b6742 in telnet_sub_option
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1686
    #18 0x7f7bb68b6742 in telnet_command
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1771
    #19 0x7f7bb68b6742 in dissect_telnet
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-telnet.c:1899
    #21 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #23 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #25 0x7f7bb5006b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #27 0x7f7bb68647c5 in decode_tcp_ports
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5542
    #29 0x7f7bb686a4d9 in process_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5611
    #31 0x7f7bb6867124 in desegment_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3134
    #32 0x7f7bb6867124 in dissect_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5684
    #34 0x7f7bb6875800 in dissect_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:6522
    #36 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #38 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #40 0x7f7bb5006b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #42 0x7f7bb5d41501 in ip_try_dissect
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:1845
    #43 0x7f7bb5d41501 in dissect_ip_v4
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:2303
    #45 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #47 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #49 0x7f7bb50078de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #50 0x7f7bb50078de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385
    #52 0x7f7bb59c47b0 in dissect_ethertype
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ethertype.c:259
    #54 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #56 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #58 0x7f7bb5002f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #59 0x7f7bb5002f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #61 0x7f7bb59c151e in dissect_eth_common
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:526
    #63 0x7f7bb59bf087 in dissect_eth
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:801
(discriminator 3)
    #65 0x7f7bb5016291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #67 0x7f7bb50070bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779

Credit goes to: Otto Airamo and Antti Levomäki, Forcepoint

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to