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

            Bug ID: 14482
           Summary: tshark memory leaks with asan / valgrind [TDMoE]
                    (3/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 16196
  --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16196&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 6 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7fc12f41f718 in g_malloc ??:?
    #4 0x7fc139e6c328 in wmem_memdup
/home/fuzzer/wireshark/wireshark/epan/wmem/wmem_miscutl.c:23
    #6 0x7fc13867b10b in alloc_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:147
    #7 0x7fc13867b10b in copy_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:265
    #8 0x7fc13867b10b in copy_address
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:275
    #10 0x7fc13867916d in dissect_lapd_bitstream
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-lapd.c:389
    #12 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #14 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #16 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #17 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #19 0x7fc13907030c in dissect_tdmoe
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tdmoe.c:107
    #21 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #23 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #25 0x7fc1377e98de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #26 0x7fc1377e98de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385
    #28 0x7fc1381a67b0 in dissect_ethertype
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ethertype.c:259
    #30 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #32 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #34 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #35 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #37 0x7fc1381a351e in dissect_eth_common
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:526
    #39 0x7fc1381a1087 in dissect_eth
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:801
(discriminator 3)
    #41 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #43 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #45 0x7fc1377e8b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #47 0x7fc138226901 in dissect_frame
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-frame.c:579
    #49 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #51 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #53 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #54 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #56 0x7fc1377e3fd7 in dissect_record
/home/fuzzer/wireshark/wireshark/epan/packet.c:568
    #58 0x7fc1377bfd15 in epan_dissect_run
/home/fuzzer/wireshark/wireshark/epan/epan.c:527
    #60 0x5185b3 in process_packet_first_pass
/home/fuzzer/wireshark/wireshark/tshark.c:2917
    #61 0x5185b3 in process_cap_file
/home/fuzzer/wireshark/wireshark/tshark.c:3186
    #62 0x5185b3 in main /home/fuzzer/wireshark/wireshark/tshark.c:2033
    #64 0x7fc12e08282f in __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291

Direct leak of 6 byte(s) in 1 object(s) allocated from:
    #0 0x4c41c8 in __interceptor_malloc ??:?
    #2 0x7fc12f41f718 in g_malloc ??:?
    #4 0x7fc139e6c328 in wmem_memdup
/home/fuzzer/wireshark/wireshark/epan/wmem/wmem_miscutl.c:23
    #6 0x7fc13867b10b in alloc_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:147
    #7 0x7fc13867b10b in copy_address_wmem
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:265
    #8 0x7fc13867b10b in copy_address
/home/fuzzer/wireshark/wireshark/epan/dissectors/../../epan/address.h:275
    #10 0x7fc13867917d in dissect_lapd_bitstream
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-lapd.c:390
    #12 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #14 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #16 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #17 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #19 0x7fc13907030c in dissect_tdmoe
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-tdmoe.c:107
    #21 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #23 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #25 0x7fc1377e98de in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #26 0x7fc1377e98de in dissector_try_uint
/home/fuzzer/wireshark/wireshark/epan/packet.c:1385
    #28 0x7fc1381a67b0 in dissect_ethertype
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-ethertype.c:259
    #30 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #32 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #34 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #35 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #37 0x7fc1381a351e in dissect_eth_common
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:526
    #39 0x7fc1381a1087 in dissect_eth
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-eth.c:801
(discriminator 3)
    #41 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #43 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #45 0x7fc1377e8b62 in dissector_try_uint_new
/home/fuzzer/wireshark/wireshark/epan/packet.c:1361
    #47 0x7fc138226901 in dissect_frame
/home/fuzzer/wireshark/wireshark/epan/dissectors/packet-frame.c:579
    #49 0x7fc1377f8291 in call_dissector_through_handle
/home/fuzzer/wireshark/wireshark/epan/packet.c:694
    #51 0x7fc1377e90bb in call_dissector_work
/home/fuzzer/wireshark/wireshark/epan/packet.c:779
    #53 0x7fc1377e4f0b in call_dissector_only
/home/fuzzer/wireshark/wireshark/epan/packet.c:3092
    #54 0x7fc1377e4f0b in call_dissector_with_data
/home/fuzzer/wireshark/wireshark/epan/packet.c:3105
    #56 0x7fc1377e3fd7 in dissect_record
/home/fuzzer/wireshark/wireshark/epan/packet.c:568
    #58 0x7fc1377bfd15 in epan_dissect_run
/home/fuzzer/wireshark/wireshark/epan/epan.c:527
    #60 0x5185b3 in process_packet_first_pass
/home/fuzzer/wireshark/wireshark/tshark.c:2917
    #61 0x5185b3 in process_cap_file
/home/fuzzer/wireshark/wireshark/tshark.c:3186
    #62 0x5185b3 in main /home/fuzzer/wireshark/wireshark/tshark.c:2033
    #64 0x7fc12e08282f in __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291

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