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

            Bug ID: 14485
           Summary: tshark memory leaks with asan / valgrind [LDAP] (6/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 16199
  --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16199&action=edit
recording causing tshark to leak memory

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 24 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7f9556712718 in g_malloc ??:?
    #4 0x7f955eace0dc in oid_string2subid
/home/fuzzer/wireshark/wireshark/epan/oids.c:927 (discriminator 4)
    #6 0x7f955ead3134 in oid_resolved_from_string
/home/fuzzer/wireshark/wireshark/epan/oids.c:1188
    #8 0x7f9560900ecd in dissect_ldap_LDAPOID
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:72
(discriminator 1)
    #10 0x7f955ef21413 in dissect_ber_sequence
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:2384
    #12 0x7f9560901fd1 in dissect_ldap_Control
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:753
    #14 0x7f955ef2ab6c in dissect_ber_sq_of
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:3482
    #16 0x7f955ef2b9f2 in dissect_ber_sequence_of
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:3513
    #18 0x7f95608f7f01 in dissect_ldap_Controls
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:766
    #20 0x7f955ef21413 in dissect_ber_sequence
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:2384
    #22 0x7f95608f5b6d in dissect_ldap_LDAPMessage
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:782
    #23 0x7f95608f5b6d in dissect_LDAPMessage_PDU
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:908
    #24 0x7f95608f5b6d in dissect_ldap_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:996
    #26 0x7f95608f4e3c in dissect_ldap_pdu
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1255
    #28 0x7f95608f3fec in dissect_sasl_ldap_pdu
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1620
    #30 0x7f9560337941 in tcp_dissect_pdus
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3612
    #32 0x7f95608ef25c in dissect_ldap_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1855
    #34 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #36 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #38 0x7f955eadbb62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #40 0x7f95603398b6 in decode_tcp_ports
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5548
    #42 0x7f956033f4d9 in process_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5611
    #44 0x7f956033c124 in desegment_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3134
    #45 0x7f956033c124 in dissect_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5684
    #47 0x7f956034a800 in dissect_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:6522
    #49 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #51 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #53 0x7f955eadbb62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #55 0x7f955f816501 in ip_try_dissect
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:1845
    #56 0x7f955f816501 in dissect_ip_v4
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:2303
    #58 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #60 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #62 0x7f955eadc8de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #63 0x7f955eadc8de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7f9556712718 in g_malloc ??:?
    #4 0x7f955eace0dc in oid_string2subid
/home/fuzzer/wireshark/wireshark/epan/oids.c:927 (discriminator 4)
    #6 0x7f955ead3134 in oid_resolved_from_string
/home/fuzzer/wireshark/wireshark/epan/oids.c:1188
    #8 0x7f9560900ecd in dissect_ldap_LDAPOID
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:72
(discriminator 1)
    #10 0x7f955ef21413 in dissect_ber_sequence
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:2384
    #12 0x7f9560901fd1 in dissect_ldap_Control
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:753
    #14 0x7f955ef2ab6c in dissect_ber_sq_of
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:3482
    #16 0x7f955ef2b9f2 in dissect_ber_sequence_of
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:3513
    #18 0x7f95608f7f01 in dissect_ldap_Controls
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:766
    #20 0x7f955ef21413 in dissect_ber_sequence
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ber.c:2384
    #22 0x7f95608f5b6d in dissect_ldap_LDAPMessage
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/ldap.cnf:782
    #23 0x7f95608f5b6d in dissect_LDAPMessage_PDU
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:908
    #24 0x7f95608f5b6d in dissect_ldap_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:996
    #26 0x7f95608f4e3c in dissect_ldap_pdu
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1255
    #28 0x7f95608f3fec in dissect_sasl_ldap_pdu
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1620
    #30 0x7f9560337941 in tcp_dissect_pdus
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3612
    #32 0x7f95608ef118 in dissect_ldap_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/./asn1/ldap/packet-ldap-template.c:1794
    #34 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #36 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #38 0x7f955eadbb62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #40 0x7f95603398b6 in decode_tcp_ports
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5548
    #42 0x7f956033f4d9 in process_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5611
    #44 0x7f956033c124 in desegment_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:3134
    #45 0x7f956033c124 in dissect_tcp_payload
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:5684
    #47 0x7f956034a800 in dissect_tcp
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tcp.c:6522
    #49 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #51 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #53 0x7f955eadbb62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #55 0x7f955f816501 in ip_try_dissect
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:1845
    #56 0x7f955f816501 in dissect_ip_v4
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ip.c:2303
    #58 0x7f955eaeb291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #60 0x7f955eadc0bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #62 0x7f955eadc8de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #63 0x7f955eadc8de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385

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