Project

General

Profile

Actions

Bug #980

closed

memory leak in http buffers at shutdown

Added by Victor Julien about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

~~Dr.M~~ Error #3: LEAK 6060 direct bytes 0x0c3ec9e0-0x0c3ee18c + 0 indirect bytes
~~Dr.M~~ # 0 replace_realloc                                [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 DetectEngineHSBDGetBufferForTX                 [/home/victor/dev/oisf/src/detect-engine-hsbd.c:180]
~~Dr.M~~ # 2 DetectEngineRunHttpServerBodyMpm               [/home/victor/dev/oisf/src/detect-engine-hsbd.c:210]
~~Dr.M~~ # 3 DetectMpmPrefilter                             [/home/victor/dev/oisf/src/detect.c:916]
~~Dr.M~~ # 4 SigMatchSignatures                             [/home/victor/dev/oisf/src/detect.c:1295]
~~Dr.M~~ # 5 Detect                                         [/home/victor/dev/oisf/src/detect.c:1696]
~~Dr.M~~ # 6 TmThreadsSlotVarRun                            [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 7 TmThreadsSlotProcessPkt                        [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 8 PcapFileCallbackLoop                           [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ # 9 libpcap.so.0.8!?                              +0x0      (0xb751c5cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #10 libpcap.so.0.8!pcap_dispatch                  +0x27     (0xb750d308 <libpcap.so.0.8+0xb308>)
~~Dr.M~~ #11 TmThreadsSlotPktAcqLoop                        [/home/victor/dev/oisf/src/tm-threads.c:703]
~~Dr.M~~ 
~~Dr.M~~ Error #4: LEAK 200 direct bytes 0x0c7d14c0-0x0c7d1588 + 85 indirect bytes
~~Dr.M~~ # 0 replace_realloc                             [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 HHDCreateSpace                              [/home/victor/dev/oisf/src/detect-engine-hhd.c:63]
~~Dr.M~~ # 2 DetectEngineHHDGetBufferForTX               [/home/victor/dev/oisf/src/detect-engine-hhd.c:96]
~~Dr.M~~ # 3 DetectEngineRunHttpHeaderMpm                [/home/victor/dev/oisf/src/detect-engine-hhd.c:194]
~~Dr.M~~ # 4 DetectMpmPrefilter                          [/home/victor/dev/oisf/src/detect.c:862]
~~Dr.M~~ # 5 SigMatchSignatures                          [/home/victor/dev/oisf/src/detect.c:1295]
~~Dr.M~~ # 6 Detect                                      [/home/victor/dev/oisf/src/detect.c:1696]
~~Dr.M~~ # 7 TmThreadsSlotVarRun                         [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 8 TmThreadsSlotProcessPkt                     [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 9 PcapFileCallbackLoop                        [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ #10 libpcap.so.0.8!?                           +0x0      (0xb751c5cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #11 libpcap.so.0.8!pcap_dispatch               +0x27     (0xb750d308 <libpcap.so.0.8+0xb308>)
~~Dr.M~~ 
~~Dr.M~~ Error #5: LEAK 200 direct bytes 0x0c7d15a8-0x0c7d1670 + 0 indirect bytes
~~Dr.M~~ # 0 replace_realloc                             [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 HHDCreateSpace                              [/home/victor/dev/oisf/src/detect-engine-hhd.c:70]
~~Dr.M~~ # 2 DetectEngineHHDGetBufferForTX               [/home/victor/dev/oisf/src/detect-engine-hhd.c:96]
~~Dr.M~~ # 3 DetectEngineRunHttpHeaderMpm                [/home/victor/dev/oisf/src/detect-engine-hhd.c:194]
~~Dr.M~~ # 4 DetectMpmPrefilter                          [/home/victor/dev/oisf/src/detect.c:862]
~~Dr.M~~ # 5 SigMatchSignatures                          [/home/victor/dev/oisf/src/detect.c:1295]
~~Dr.M~~ # 6 Detect                                      [/home/victor/dev/oisf/src/detect.c:1696]
~~Dr.M~~ # 7 TmThreadsSlotVarRun                         [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 8 TmThreadsSlotProcessPkt                     [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 9 PcapFileCallbackLoop                        [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ #10 libpcap.so.0.8!?                           +0x0      (0xb751c5cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #11 libpcap.so.0.8!pcap_dispatch               +0x27     (0xb750d308 <libpcap.so.0.8+0xb308>)

Generated with:

../../build/DrMemory-Linux-1.6.0-2/bin/drmemory.pl -suppress drmemory.suppress -- /home/victor/dev/oisf/src/suricata -c /home/victor/dev/oisf/suricata.yaml -l tmp -S /etc/suricata/rules/attack_response.rules --runmode=single -r /home/victor/sandnet.pcap

Actions #1

Updated by Anoop Saldanha about 11 years ago

  • Assignee changed from OISF Dev to Anoop Saldanha
Actions #3

Updated by Anoop Saldanha about 11 years ago

  • Status changed from New to Closed
Actions #4

Updated by Victor Julien about 11 years ago

  • Status changed from Closed to Assigned

I still get:

~~Dr.M~~ 
~~Dr.M~~ Error #1: LEAK 6060 direct bytes 0x0abaa968-0x0abac114 + 0 indirect bytes
~~Dr.M~~ # 0 replace_realloc                                [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 DetectEngineHSBDGetBufferForTX                 [/home/victor/dev/oisf/src/detect-engine-hsbd.c:180]
~~Dr.M~~ # 2 DetectEngineRunHttpServerBodyMpm               [/home/victor/dev/oisf/src/detect-engine-hsbd.c:210]
~~Dr.M~~ # 3 DetectMpmPrefilter                             [/home/victor/dev/oisf/src/detect.c:917]
~~Dr.M~~ # 4 SigMatchSignatures                             [/home/victor/dev/oisf/src/detect.c:1296]
~~Dr.M~~ # 5 Detect                                         [/home/victor/dev/oisf/src/detect.c:1697]
~~Dr.M~~ # 6 TmThreadsSlotVarRun                            [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 7 TmThreadsSlotProcessPkt                        [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 8 PcapFileCallbackLoop                           [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ # 9 libpcap.so.0.8!?                              +0x0      (0xb750b5cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #10 libpcap.so.0.8!pcap_dispatch                  +0x27     (0xb74fc308 <libpcap.so.0.8+0xb308>)
~~Dr.M~~ #11 TmThreadsSlotPktAcqLoop                        [/home/victor/dev/oisf/src/tm-threads.c:703]
~~Dr.M~~ 

Actions #5

Updated by Victor Julien about 11 years ago

  • Status changed from Assigned to Closed

Also:

~~Dr.M~~ 
~~Dr.M~~ Error #1: LEAK 200 direct bytes 0x0b95ed80-0x0b95ee48 + 85 indirect bytes
~~Dr.M~~ # 0 replace_realloc                             [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 HHDCreateSpace                              [/home/victor/dev/oisf/src/detect-engine-hhd.c:63]
~~Dr.M~~ # 2 DetectEngineHHDGetBufferForTX               [/home/victor/dev/oisf/src/detect-engine-hhd.c:96]
~~Dr.M~~ # 3 DetectEngineRunHttpHeaderMpm                [/home/victor/dev/oisf/src/detect-engine-hhd.c:194]
~~Dr.M~~ # 4 DetectMpmPrefilter                          [/home/victor/dev/oisf/src/detect.c:863]
~~Dr.M~~ # 5 SigMatchSignatures                          [/home/victor/dev/oisf/src/detect.c:1296]
~~Dr.M~~ # 6 Detect                                      [/home/victor/dev/oisf/src/detect.c:1697]
~~Dr.M~~ # 7 TmThreadsSlotVarRun                         [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 8 TmThreadsSlotProcessPkt                     [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 9 PcapFileCallbackLoop                        [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ #10 libpcap.so.0.8!?                           +0x0      (0xb74d65cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #11 libpcap.so.0.8!pcap_dispatch               +0x27     (0xb74c7308 <libpcap.so.0.8+0xb308>)
~~Dr.M~~ 
~~Dr.M~~ Error #2: LEAK 200 direct bytes 0x0b95ee68-0x0b95ef30 + 0 indirect bytes
~~Dr.M~~ # 0 replace_realloc                             [/work/drmemory_package/common/alloc_replace.c:2334]
~~Dr.M~~ # 1 HHDCreateSpace                              [/home/victor/dev/oisf/src/detect-engine-hhd.c:70]
~~Dr.M~~ # 2 DetectEngineHHDGetBufferForTX               [/home/victor/dev/oisf/src/detect-engine-hhd.c:96]
~~Dr.M~~ # 3 DetectEngineRunHttpHeaderMpm                [/home/victor/dev/oisf/src/detect-engine-hhd.c:194]
~~Dr.M~~ # 4 DetectMpmPrefilter                          [/home/victor/dev/oisf/src/detect.c:863]
~~Dr.M~~ # 5 SigMatchSignatures                          [/home/victor/dev/oisf/src/detect.c:1296]
~~Dr.M~~ # 6 Detect                                      [/home/victor/dev/oisf/src/detect.c:1697]
~~Dr.M~~ # 7 TmThreadsSlotVarRun                         [/home/victor/dev/oisf/src/tm-threads.c:559]
~~Dr.M~~ # 8 TmThreadsSlotProcessPkt                     [/home/victor/dev/oisf/src/tm-threads.h:142]
~~Dr.M~~ # 9 PcapFileCallbackLoop                        [/home/victor/dev/oisf/src/source-pcap-file.c:154]
~~Dr.M~~ #10 libpcap.so.0.8!?                           +0x0      (0xb74d65cb <libpcap.so.0.8+0x1a5cb>)
~~Dr.M~~ #11 libpcap.so.0.8!pcap_dispatch               +0x27     (0xb74c7308 <libpcap.so.0.8+0xb308>)
~~Dr.M~~ 

Actions #6

Updated by Victor Julien about 11 years ago

Looking at the PR, I don't think a fix was attempted. Must be a mix up of ticket id's.

Actions #7

Updated by Anoop Saldanha about 11 years ago

@Victor

I see the status still as closed.

The last update on leak HHD is something that my commit fixed as well, or the leak still exists?

Actions #8

Updated by Victor Julien about 11 years ago

  • Status changed from Closed to Assigned

Closed it again by accident. I don't see which commit tries to address these issues. AFAICS they are all still there.

Actions #9

Updated by Anoop Saldanha about 11 years ago

Cool.

Looks like a PR mess up by me. I definitely recollect writing code to fix it. Searching.

Actions #10

Updated by Victor Julien almost 11 years ago

Added DrMemory suppressions for this bug, a patchset should remove them so QA will fail if the bug isn't properly fixed.

Actions #11

Updated by Victor Julien almost 11 years ago

  • Target version changed from 2.0beta2 to 2.0rc1
Actions #12

Updated by Victor Julien almost 11 years ago

  • Priority changed from Normal to High
Actions #13

Updated by Victor Julien almost 11 years ago

  • Assignee changed from Anoop Saldanha to Victor Julien
Actions #14

Updated by Victor Julien almost 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF