Actions
Bug #3879
closeddetasets related memleak
Affected Versions:
Effort:
Difficulty:
Label:
Description
So far I have been able to reproduce this with any dataset/rules combo when suricata is compiled with asan and reading a pcap.
/opt/suritest/bin/suricata -S datasets/dns-dataset.rules -l logs/ -k none -r private.pcap [916780] 15/8/2020 -- 17:19:00 - (suricata.c:1065) <Notice> (LogVersion) -- This is Suricata version 6.0.0-dev (ac491c6e8 2020-08-07) running in USER mode [916780] 15/8/2020 -- 17:19:00 - (flow.c:635) <Notice> (FlowInitConfig) -- flow size 328, memcap allows for 409200 flows. Per hash row in perfect conditions 6 [916780] 15/8/2020 -- 17:19:00 - (datasets.c:428) <Notice> (DatasetGet) -- dataset and datarep features are experimental and subject to change [916780] 15/8/2020 -- 17:19:05 - (tm-threads.c:1964) <Notice> (TmThreadWaitOnThreadInit) -- all 9 packet processing threads, 4 management threads initialized, engine started. [916793] 15/8/2020 -- 17:19:05 - (flow-manager.c:805) <Notice> (FlowManager) -- FM FM#01/0 starting. min_timeout 30s. Full hash pass in 240s [916780] 15/8/2020 -- 17:19:05 - (suricata.c:2638) <Notice> (SuricataMainLoop) -- Signal Received. Stopping engine. [916780] 15/8/2020 -- 17:19:05 - (flow-manager.c:1299) <Notice> (FlowDisableFlowRecyclerThread) -- flows to progress: 106 [916784] 15/8/2020 -- 17:19:05 - (source-pcap-file.c:382) <Notice> (ReceivePcapFileThreadExitStats) -- Pcap-file module read 1 files, 50000 packets, 44139809 bytes ================================================================= ==916780==ERROR: LeakSanitizer: detected memory leaks Direct leak of 15759243 byte(s) in 812214 object(s) allocated from: #0 0x7fa2a5d16628 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107628) #1 0x55aadba1a4ab in SCMallocFunc /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-mem.c:30 #2 0x55aadb656c04 in StringSet /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets-string.c:68 #3 0x55aadba79815 in THashDataGetNew /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-thash.c:493 #4 0x55aadba79c98 in THashGetFromHash /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-thash.c:549 #5 0x55aadb65477c in DatasetAddString /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:939 #6 0x55aadb6557f8 in DatasetAdd /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:1049 #7 0x55aadb650aeb in DatasetLoadString /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:326 #8 0x55aadb651afb in DatasetGet /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:504 #9 0x55aadb6c24a2 in DetectDatasetSetup /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-dataset.c:374 #10 0x55aadb7b4ef5 in SigParseOptions /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:808 #11 0x55aadb7b6d6f in SigParse /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:1239 #12 0x55aadb7bbc3b in SigInitHelper /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:1881 #13 0x55aadb7bccf2 in SigInit /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:2048 #14 0x55aadb7be7d6 in DetectEngineAppendSig /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:2346 #15 0x55aadb71ea09 in DetectLoadSigFile /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:169 #16 0x55aadb71f219 in ProcessSigFiles /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:252 #17 0x55aadb71fb1c in SigLoadSignatures /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:331 #18 0x55aadb983bfa in LoadSignatures /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2200 #19 0x55aadb9848a7 in PostConfLoadedDetectSetup /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2352 #20 0x55aadb9862aa in SuricataMain /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2793 #21 0x55aadb59bad3 in main /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/main.c:22 #22 0x7fa2a4620cc9 in __libc_start_main ../csu/libc-start.c:308 Direct leak of 2154 byte(s) in 115 object(s) allocated from: #0 0x7fa2a5d16628 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107628) #1 0x55aadba1a4ab in SCMallocFunc /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-mem.c:30 #2 0x55aadb656c04 in StringSet /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets-string.c:68 #3 0x55aadba79815 in THashDataGetNew /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-thash.c:493 #4 0x55aadba79a6c in THashGetFromHash /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/util-thash.c:518 #5 0x55aadb65477c in DatasetAddString /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:939 #6 0x55aadb6557f8 in DatasetAdd /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:1049 #7 0x55aadb650aeb in DatasetLoadString /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:326 #8 0x55aadb651afb in DatasetGet /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/datasets.c:504 #9 0x55aadb6c24a2 in DetectDatasetSetup /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-dataset.c:374 #10 0x55aadb7b4ef5 in SigParseOptions /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:808 #11 0x55aadb7b6d6f in SigParse /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:1239 #12 0x55aadb7bbc3b in SigInitHelper /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:1881 #13 0x55aadb7bccf2 in SigInit /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:2048 #14 0x55aadb7be7d6 in DetectEngineAppendSig /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-parse.c:2346 #15 0x55aadb71ea09 in DetectLoadSigFile /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:169 #16 0x55aadb71f219 in ProcessSigFiles /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:252 #17 0x55aadb71fb1c in SigLoadSignatures /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/detect-engine-loader.c:331 #18 0x55aadb983bfa in LoadSignatures /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2200 #19 0x55aadb9848a7 in PostConfLoadedDetectSetup /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2352 #20 0x55aadb9862aa in SuricataMain /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/suricata.c:2793 #21 0x55aadb59bad3 in main /home/pevma/inthetrenches/Suricata/suricomp/suricata/src/main.c:22 #22 0x7fa2a4620cc9 in __libc_start_main ../csu/libc-start.c:308
Updated by Victor Julien about 4 years ago
- Status changed from New to Assigned
- Assignee set to Shivani Bhardwaj
- Target version set to 6.0.0rc1
Updated by Shivani Bhardwaj about 4 years ago
- Priority changed from Normal to High
Updated by Shivani Bhardwaj about 4 years ago
- Status changed from Assigned to Closed
- Assignee changed from Shivani Bhardwaj to Victor Julien
Updated by Jeff Lucovsky almost 3 years ago
- Related to Bug #4878: datasets: memory leak in 5.0.x added
Actions