Project

General

Profile

Bug #4326

asan leak DetectFileHashFree

Added by Peter Manev 4 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:

Description

Chasing a leak currently with version 7.0.0-dev (e929b6d7a 2021-02-09) but think it is the same with master.

=================================================================
==26843==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 19744 byte(s) in 617 object(s) allocated from:
    #0 0x5915ea in DetectFileHashFree /opt/suricata/src/detect-file-hash-common.c:379:1
    #1 0xc74eb9 in _fini (/opt/suritest-tmp/bin/suricata+0xc74eb9)
    #2 0x664cb3 in StreamTcpPacketStateFinWait2 /opt/suricata/src/stream-tcp.c:3497:17
    #3 0x660417 in StreamTcpPacketStateEstablished /opt/suricata/src/stream-tcp.c:2527:9
    #4 0x699dd7 in IsIpv6Host /opt/suricata/src/util-decode-mime.c:956:12
    #5 0x5d85e6 in PrefilterMpmMQTTSubscribeTopicRegister /opt/suricata/src/detect-mqtt-subscribe-topic.c:181
    #6 0xb7f99e in _fini (/opt/suritest-tmp/bin/suricata+0xb7f99e)
    #7 0xb7dacb in _fini (/opt/suritest-tmp/bin/suricata+0xb7dacb)
    #8 0xb85877 in _fini (/opt/suritest-tmp/bin/suricata+0xb85877)
    #9 0xb85500 in _fini (/opt/suritest-tmp/bin/suricata+0xb85500)
    #10 0xb5a38b in _fini (/opt/suritest-tmp/bin/suricata+0xb5a38b)
    #11 0xb1b769 in _fini (/opt/suritest-tmp/bin/suricata+0xb1b769)
    #12 0xafd6a9 in _fini (/opt/suritest-tmp/bin/suricata+0xafd6a9)
    #13 0xaf3d99 in _fini (/opt/suritest-tmp/bin/suricata+0xaf3d99)
    #14 0xafe8ac in _fini (/opt/suritest-tmp/bin/suricata+0xafe8ac)
    #15 0x9a5917  (/opt/suritest-tmp/bin/suricata+0x9a5917)
    #16 0x9a485d in _$LT$snmp_parser..snmpv3..HeaderData$u20$as$u20$core..fmt..Debug$GT$::fmt::h66eeb2e4628aa4cf /root/.cargo/registry/src/github.com-1ecc6299db9ec823/snmp-parser-0.6.0/src/snmpv3.rs:58:23
    #17 0xbafe3e in _fini (/opt/suritest-tmp/bin/suricata+0xbafe3e)
    #18 0xacf222 in _fini (/opt/suritest-tmp/bin/suricata+0xacf222)
    #19 0xac8110 in _fini (/opt/suritest-tmp/bin/suricata+0xac8110)
    #20 0xac6787 in _fini (/opt/suritest-tmp/bin/suricata+0xac6787)
    #21 0xabe0b0 in _fini (/opt/suritest-tmp/bin/suricata+0xabe0b0)
    #22 0xabbc87 in _fini (/opt/suritest-tmp/bin/suricata+0xabbc87)
    #23 0xbbdd9f in _fini (/opt/suritest-tmp/bin/suricata+0xbbdd9f)
    #24 0x7f8c54b22fa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)

Indirect leak of 18034 byte(s) in 617 object(s) allocated from:
    #0 0x5915ea in DetectFileHashFree /opt/suricata/src/detect-file-hash-common.c:379:1
    #1 0xc74eb9 in _fini (/opt/suritest-tmp/bin/suricata+0xc74eb9)
    #2 0x664cb3 in StreamTcpPacketStateFinWait2 /opt/suricata/src/stream-tcp.c:3497:17
    #3 0x6606b1 in StreamTcpPacketStateEstablished /opt/suricata/src/stream-tcp.c:2544:13
    #4 0x699dd7 in IsIpv6Host /opt/suricata/src/util-decode-mime.c:956:12
    #5 0x5d85e6 in PrefilterMpmMQTTSubscribeTopicRegister /opt/suricata/src/detect-mqtt-subscribe-topic.c:181
    #6 0xb7f99e in _fini (/opt/suritest-tmp/bin/suricata+0xb7f99e)
    #7 0xb7dacb in _fini (/opt/suritest-tmp/bin/suricata+0xb7dacb)
    #8 0xb85877 in _fini (/opt/suritest-tmp/bin/suricata+0xb85877)
    #9 0xb85500 in _fini (/opt/suritest-tmp/bin/suricata+0xb85500)
    #10 0xb5a38b in _fini (/opt/suritest-tmp/bin/suricata+0xb5a38b)
    #11 0xb1b769 in _fini (/opt/suritest-tmp/bin/suricata+0xb1b769)
    #12 0xafd6a9 in _fini (/opt/suritest-tmp/bin/suricata+0xafd6a9)
    #13 0xaf3d99 in _fini (/opt/suritest-tmp/bin/suricata+0xaf3d99)
    #14 0xafe8ac in _fini (/opt/suritest-tmp/bin/suricata+0xafe8ac)
    #15 0x9a5917  (/opt/suritest-tmp/bin/suricata+0x9a5917)
    #16 0x9a485d in _$LT$snmp_parser..snmpv3..HeaderData$u20$as$u20$core..fmt..Debug$GT$::fmt::h66eeb2e4628aa4cf /root/.cargo/registry/src/github.com-1ecc6299db9ec823/snmp-parser-0.6.0/src/snmpv3.rs:58:23
    #17 0xbafe3e in _fini (/opt/suritest-tmp/bin/suricata+0xbafe3e)
    #18 0xacf222 in _fini (/opt/suritest-tmp/bin/suricata+0xacf222)
    #19 0xac8110 in _fini (/opt/suritest-tmp/bin/suricata+0xac8110)
    #20 0xac6787 in _fini (/opt/suritest-tmp/bin/suricata+0xac6787)
    #21 0xabe0b0 in _fini (/opt/suritest-tmp/bin/suricata+0xabe0b0)
    #22 0xabbc87 in _fini (/opt/suritest-tmp/bin/suricata+0xabbc87)
    #23 0xbbdd9f in _fini (/opt/suritest-tmp/bin/suricata+0xbbdd9f)
    #24 0x7f8c54b22fa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)

SUMMARY: AddressSanitizer: 37778 byte(s) leaked in 1234 allocation(s).

#1

Updated by Jeff Lucovsky 2 months ago

Do you have a pcap that demonstrates the problem?

What was the suri config?

#2

Updated by Peter Manev 2 months ago

No, I am afraid not.
Any better info might be of help - i will try to see if i can reproduce again.

Also available in: Atom PDF