Project

General

Profile

Actions

Bug #2566

closed

memleak: applayer dhcp with 4.1.0-dev (rev 9370805)

Added by Peter Manev over 6 years ago. Updated over 6 years ago.

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

Description

Using the following run (pcap privately shared.):

LSAN_OPTIONS=suppressions=/home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf-current/qa/lsan.suppress ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer /opt/suricata-asan/bin/suricata -c /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/fuzz.suricata.sandnet.socket.yaml -r 2000026.pcap -l tmplog/ -S /dev/null

=================================================================
==91481==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 176 byte(s) in 11 object(s) allocated from:
    #0 0x4c0348 in __interceptor_malloc (/opt/suricata-asan/bin/suricata+0x4c0348)
    #1 0x718a3f in AppLayerDecoderEventsSetEventRaw /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-events.c:76:46
    #2 0x19dcf2e in suricata::core::sc_app_layer_decoder_events_set_event_raw::h550294c209a6f6a0 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/core.rs:169
    #3 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::set_event::h4c172f5b96bf0d24 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:175
    #4 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::parse::h8743d71017a2b574 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:137
    #5 0x19dcf2e in rs_dhcp_parse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:264
    #6 0x7b183c in AppLayerParserParse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-parser.c:1145:13
    #7 0x545f01 in AppLayerHandleUdp /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer.c:692:17
    #8 0x13503aa in FlowWorker /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/flow-worker.c:248:9
    #9 0x16f9515 in TmThreadsSlotVarRun /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:143:17
    #10 0x170a63c in TmThreadsSlotVar /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:598:17
    #11 0x7ff5e1f2c6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x4c0348 in __interceptor_malloc (/opt/suricata-asan/bin/suricata+0x4c0348)
    #1 0x718a3f in AppLayerDecoderEventsSetEventRaw /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-events.c:76:46
    #2 0x19dcf2e in suricata::core::sc_app_layer_decoder_events_set_event_raw::h550294c209a6f6a0 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/core.rs:169
    #3 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::set_event::h4c172f5b96bf0d24 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:175
    #4 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::parse::h8743d71017a2b574 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:137
    #5 0x19dcf2e in rs_dhcp_parse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:264
    #6 0x7b183c in AppLayerParserParse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-parser.c:1145:13
    #7 0x546178 in AppLayerHandleUdp /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer.c:710:13
    #8 0x13503aa in FlowWorker /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/flow-worker.c:248:9
    #9 0x16f9515 in TmThreadsSlotVarRun /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:143:17
    #10 0x170a63c in TmThreadsSlotVar /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:598:17
    #11 0x7ff5e1f2c6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

Indirect leak of 88 byte(s) in 11 object(s) allocated from:
    #0 0x4c06c8 in realloc (/opt/suricata-asan/bin/suricata+0x4c06c8)
    #1 0x719504 in AppLayerDecoderEventsSetEventRaw /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-events.c:93:21
    #2 0x19dcf2e in suricata::core::sc_app_layer_decoder_events_set_event_raw::h550294c209a6f6a0 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/core.rs:169
    #3 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::set_event::h4c172f5b96bf0d24 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:175
    #4 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::parse::h8743d71017a2b574 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:137
    #5 0x19dcf2e in rs_dhcp_parse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:264
    #6 0x7b183c in AppLayerParserParse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-parser.c:1145:13
    #7 0x545f01 in AppLayerHandleUdp /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer.c:692:17
    #8 0x13503aa in FlowWorker /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/flow-worker.c:248:9
    #9 0x16f9515 in TmThreadsSlotVarRun /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:143:17
    #10 0x170a63c in TmThreadsSlotVar /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:598:17
    #11 0x7ff5e1f2c6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x4c06c8 in realloc (/opt/suricata-asan/bin/suricata+0x4c06c8)
    #1 0x719504 in AppLayerDecoderEventsSetEventRaw /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-events.c:93:21
    #2 0x19dcf2e in suricata::core::sc_app_layer_decoder_events_set_event_raw::h550294c209a6f6a0 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/core.rs:169
    #3 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::set_event::h4c172f5b96bf0d24 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:175
    #4 0x19dcf2e in suricata::dhcp::dhcp::DHCPState::parse::h8743d71017a2b574 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:137
    #5 0x19dcf2e in rs_dhcp_parse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/rust/src/dhcp/dhcp.rs:264
    #6 0x7b183c in AppLayerParserParse /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer-parser.c:1145:13
    #7 0x546178 in AppLayerHandleUdp /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/app-layer.c:710:13
    #8 0x13503aa in FlowWorker /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/flow-worker.c:248:9
    #9 0x16f9515 in TmThreadsSlotVarRun /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:143:17
    #10 0x170a63c in TmThreadsSlotVar /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/oisf/src/tm-threads.c:598:17
    #11 0x7ff5e1f2c6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

SUMMARY: AddressSanitizer: 288 byte(s) leaked in 24 allocation(s).

Suricata info:


This is Suricata version 4.1.0-dev (rev 9370805)
Features: UNITTESTS PCAP_SET_BUFF AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT HAVE_NSS HAVE_LUA HAVE_LUAJIT HAVE_LIBJANSSON TLS MAGIC RUST 
SIMD support: SSE_4_2 SSE_4_1 SSE_3 
Atomic intrisics: 1 2 4 8 16 byte(s)
64-bits, Little-endian architecture
GCC version 4.2.1 Compatible Clang 3.8.0 (tags/RELEASE_380/final), C version 199901
compiled with _FORTIFY_SOURCE=0
L1 cache line size (CLS)=64
thread local storage method: __thread
compiled with LibHTP v0.5.27, linked against LibHTP v0.5.27

Suricata Configuration:
  AF_PACKET support:                       yes
  eBPF support:                            no
  XDP support:                             
  PF_RING support:                         no
  NFQueue support:                         no
  NFLOG support:                           no
  IPFW support:                            no
  Netmap support:                          no
  DAG enabled:                             no
  Napatech enabled:                        no
  WinDivert enabled:                       no

  Unix socket enabled:                     yes
  Detection enabled:                       yes

  Libmagic support:                        yes
  libnss support:                          yes
  libnspr support:                         yes
  libjansson support:                      yes
  liblzma support:                         yes
  hiredis support:                         no
  hiredis async with libevent:             no
  Prelude support:                         no
  PCRE jit:                                yes
  LUA support:                             yes, through luajit
  libluajit:                               yes
  libgeoip:                                yes
  Non-bundled htp:                         no
  Old barnyard2 support:                   no
  Hyperscan support:                       no
  Libnet support:                          yes
  liblz4 support:                          yes

  Rust support (experimental):             yes
  Rust strict mode:                        yes
  Rust debug mode:                         no

  Suricatasc install:                      yes

  Profiling enabled:                       no
  Profiling locks enabled:                 no

Development settings:
  Coccinelle / spatch:                     yes
  Unit tests enabled:                      yes
  Debug output enabled:                    no
  Debug validation enabled:                no

Generic build parameters:
  Installation prefix:                     /opt/suricata-asan
  Configuration directory:                 /opt/suricata-asan/etc/suricata/
  Log directory:                           /opt/suricata-asan/var/log/suricata/

  --prefix                                 /opt/suricata-asan
  --sysconfdir                             /opt/suricata-asan/etc
  --localstatedir                          /opt/suricata-asan/var

  Host:                                    x86_64-pc-linux-gnu
  Compiler:                                clang (exec name) / clang (real)
  GCC Protect enabled:                     no
  GCC march native enabled:                yes
  GCC Profile enabled:                     no
  Position Independent Executable enabled: no
  CFLAGS                                   -ggdb3 -Werror -Wchar-subscripts -fno-strict-aliasing -fstack-protector-all -fsanitize=address -fno-omit-frame-pointer -Wno-unused-parameter -Wno-unused-function -march
=native -I${srcdir}/../rust/gen/c-headers
  PCAP_CFLAGS                               -I/usr/include
  SECCFLAGS                                

Actions

Also available in: Atom PDF