Project

General

Profile

Actions

Bug #2571

closed

coredump: liballoc/vec.rs dhcp

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

Reproducible 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 /home/pmanev/sandnet-qa/test/asan-ginfiz-runs/logs/2007772.pcap-fuzzed -l tmplog/ -S /dev/null

[152977] 8/8/2018 -- 05:23:35 - (suricata.c:1084) <Notice> (LogVersion) -- This is Suricata version 4.1.0-dev (rev a337908)
[152977] 8/8/2018 -- 05:23:35 - (tm-threads.c:2172) <Notice> (TmThreadWaitOnThreadInit) -- all 61 packet processing threads, 2 management threads initialized, engine started.
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', liballoc/vec.rs:1551:10
note: Run with `RUST_BACKTRACE=1` for a backtrace.
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

Thread 1 (Thread 0x7efded3aa700 (LWP 153021)):
#0  0x00007efe074a4428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007efe074a602a in __GI_abort () at abort.c:89
#2  0x0000000001a896d9 in std::sys::unix::abort_internal::h51b0c92e7c6d8a93 ()
#3  0x0000000001a9de2b in std::sys_common::util::abort::h535e2f860370a5f7 ()
#4  0x0000000001a6ea72 in rust_panic ()
#5  0x0000000001a6e992 in std::panicking::rust_panic_with_hook::he8346e7912797ff1 ()
#6  0x0000000001a6e73f in std::panicking::begin_panic::h7eb321f279c30f36 ()
#7  0x0000000001a6e6ab in std::panicking::begin_panic_fmt::h3e1b2c309f719757 ()
#8  0x0000000001a6e643 in rust_begin_unwind ()
#9  0x0000000001ab6651 in core::panicking::panic_fmt::hab703c003f911be6 ()
#10 0x0000000001ab65f4 in core::panicking::panic_bounds_check::h830e2df90c2a6008 ()
#11 0x0000000001998c3c in _$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$core..ops..index..Index$LT$usize$GT$$GT$::index::h4e9e55670dfd362d (index=0, self=<optimized out>) at liballoc/vec.rs:1551
#12 suricata::dhcp::logger::DHCPLogger::log_opt_type::hf5768ffd0c2de44f (self=<optimized out>, js=<optimized out>, option=<optimized out>) at src/dhcp/logger.rs:193
#13 suricata::dhcp::logger::DHCPLogger::log::h4caf6e55c7f17334 (self=<optimized out>, tx=<optimized out>) at src/dhcp/logger.rs:159
#14 rs_dhcp_logger_log (logger=<optimized out>, tx=<optimized out>) at src/dhcp/logger.rs:272
#15 0x0000000001489624 in JsonDHCPLogger (tv=0x6120017b3240, thread_data=0x60300087d4e0, p=0x61e000309080, f=0x6120000097c0, state=0x6040006188d0, tx=0x619000005580, tx_id=0) at output-json-dhcp.c:81
---Type <return> to continue, or q <return> to quit---
#16 0x00000000014af194 in OutputTxLog (tv=0x6120017b3240, p=0x61e000309080, thread_data=0x602000051ab0) at output-tx.c:236
#17 0x00000000013f14ab in OutputLoggerLog (tv=0x6120017b3240, p=0x61e000309080, thread_data=0x602000051b50) at output.c:920
#18 0x0000000001350886 in FlowWorker (tv=0x6120017b3240, p=0x61e000309080, data=0x60d000144f70, preq=0x6120017b3100, unused=0x6120017b3170) at flow-worker.c:263
#19 0x00000000016f9816 in TmThreadsSlotVarRun (tv=0x6120017b3240, p=0x61e000309080, slot=0x6120017b30c0) at tm-threads.c:143
#20 0x000000000170a93d in TmThreadsSlotVar (td=0x6120017b3240) at tm-threads.c:598
#21 0x00007efe093556ba in start_thread (arg=0x7efded3aa700) at pthread_create.c:333
#22 0x00007efe0757641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Suricata info


This is Suricata version 4.1.0-dev (rev a337908)
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 #1

Updated by Peter Manev over 6 years ago

Forgot to mention - using

rustc -V
rustc 1.25.0

Actions #2

Updated by Victor Julien over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Jason Ish
  • Target version set to 4.1rc2
  • Affected Versions 4.1rc1 added
Actions #3

Updated by Victor Julien over 6 years ago

  • Priority changed from Normal to High
Actions #4

Updated by Victor Julien over 6 years ago

  • Status changed from Assigned to Closed
  • Priority changed from High to Normal
Actions

Also available in: Atom PDF