Bug #2913
closedSIGABRT reading a pcap
Description
I get consistently SIGABRT when reading a specific pcap. Some info below (I have the full core so can share any info needed):
[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `suricata -c /etc/suricata/suricata.yaml -k none -r exercises/pcaps/hunt-2'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) thread apply all bt Thread 1 (Thread 0x7fbe71073440 (LWP 7829)): #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007fbe6c31d42a in __GI_abort () at abort.c:89 #2 0x00007fbe6c314e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55edae677d48 "!((h->use_cnt_sc_atomic__) > 0)", file=file@entry=0x55edae677d68 "host.c", line=line@entry=309, function=function@entry=0x55edae677db8 <__PRETTY_FUNCTION__.18681> "HostShutdown") at assert.c:92 #3 0x00007fbe6c314f12 in __GI___assert_fail (assertion=assertion@entry=0x55edae677d48 "!((h->use_cnt_sc_atomic__) > 0)", file=file@entry=0x55edae677d68 "host.c", line=line@entry=309, function=function@entry=0x55edae677db8 <__PRETTY_FUNCTION__.18681> "HostShutdown") at assert.c:101 #4 0x000055edae403e31 in HostShutdown () at host.c:309 #5 0x000055edae2dc3af in GlobalsDestroy (suri=0x55edae961920 <suricata>, suri=0x55edae961920 <suricata>) at suricata.c:347 #6 main (argc=<optimized out>, argv=<optimized out>) at suricata.c:3016 (gdb) quit suricata --build-info This is Suricata version 5.0.0-dev (rev 5626528c7) Features: NFQ 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: none Atomic intrisics: 1 2 4 8 byte(s) 64-bits, Little-endian architecture GCC version 6.3.0 20170516, C version 199901 compiled with _FORTIFY_SOURCE=2 L1 cache line size (CLS)=64 thread local storage method: __thread compiled with LibHTP v0.5.30, linked against LibHTP v0.5.30 Suricata Configuration: AF_PACKET support: yes eBPF support: no XDP support: no PF_RING support: no NFQueue support: yes 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: yes hiredis async with libevent: no Prelude support: no PCRE jit: yes LUA support: yes, through luajit libluajit: yes libgeoip: yes Non-bundled htp: yes Old barnyard2 support: no Hyperscan support: yes Libnet support: yes liblz4 support: yes Rust support: yes (default) Rust strict mode: no Rust debug mode: no Rust compiler: rustc 1.33.0 (2aa4c46cf 2019-02-28) Rust cargo: cargo 1.33.0 (f099fe94b 2019-02-12) Python support: yes Python path: /usr/bin/python3 Python version: Python 3.5.3 Python distutils yes Python yaml yes Install suricatactl: yes Install suricatasc: yes Install suricata-update: not bundled Profiling enabled: no Profiling locks enabled: no Development settings: Coccinelle / spatch: no Unit tests enabled: no Debug output enabled: no Debug validation enabled: no Generic build parameters: Installation prefix: /usr Configuration directory: /etc/suricata/ Log directory: /var/log/suricata/ --prefix /usr --sysconfdir /etc --localstatedir /var --datarootdir /usr/share Host: x86_64-pc-linux-gnu Compiler: gcc (exec name) / gcc (real) GCC Protect enabled: yes GCC march native enabled: no GCC Profile enabled: no Position Independent Executable enabled: yes CFLAGS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I${srcdir}/../rust/gen/c-headers PCAP_CFLAGS -I/usr/include SECCFLAGS -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
Updated by Peter Manev over 5 years ago
- Project changed from Suricata-Update to Suricata
This is Suricata bug report, not wrt Suricata-update.
Updated by Peter Manev over 5 years ago
Seems so actually - but i am not sure.
Further investigating this - i can only reproduce the sigabrt in a certain scenario - not on every OS.
I have a pcap and set up for this to reproduce it that I will privately share.
Updated by Andreas Herz over 5 years ago
- Assignee set to OISF Dev
- Target version set to TBD
Updated by Peter Manev over 5 years ago
Thanks to a pcap pointer from Josh Stroschein - was able to do a bit more investigation.
It seems it only happens on Stretch (that i have found at the moment) on Suricata exit with pcaps that have "capture length 65535"
root@stretch:/home/user# file exercises/pcaps/bsideshunt-1.pcap exercises/pcaps/bsideshunt-1.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535) root@stretch:/home/user# file exercises/pcaps/bsideshunt-2.pcap exercises/pcaps/bsideshunt-2.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535) root@stretch:/home/user# file exercises/pcaps/honeytoken_ipv4.pcap exercises/pcaps/honeytoken_ipv4.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 262144) root@stretch:/home/user# file exercises/pcaps/hunting-small.pcap exercises/pcaps/hunting-small.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 262144) root@stretch:/home/user# file exercises/pcaps/additional_trickbot_traffic.pcap exercises/pcaps/additional_trickbot_traffic.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535) root@stretch:/home/user# file exercises/pcaps/EOD_Day1_2.pcap exercises/pcaps/EOD_Day1_2.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 262144)
The core isn't generated if the pcap capture length is 262144.
1 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) (gdb) set logging on Copying output to gdb.txt. (gdb) thread apply all bt Thread 1 (Thread 0x7fdf0371a000 (LWP 28063)): #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007fdefde7842a in __GI_abort () at abort.c:89 #2 0x00007fdefde6fe67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55fcce9e3ca0 "!((h->use_cnt_sc_atomic__) > 0)", file=file@entry=0x55fcce9e35c0 "host.c", line=line@entry=309, function=function@entry=0x55fcce9e3da0 <__PRETTY_FUNCTION__.17478> "HostShutdown") at assert.c:92 #3 0x00007fdefde6ff12 in __GI___assert_fail (assertion=0x55fcce9e3ca0 "!((h->use_cnt_sc_atomic__) > 0)", file=0x55fcce9e35c0 "host.c", line=309, function=0x55fcce9e3da0 <__PRETTY_FUNCTION__.17478> "HostShutdown") at assert.c:101 #4 0x000055fcce4c6190 in HostShutdown () at host.c:309 #5 0x000055fcce676875 in GlobalsDestroy (suri=0x55fccedebf00 <suricata>) at suricata.c:348 #6 0x000055fcce688645 in main (argc=10, argv=0x7ffeaec976f8) at suricata.c:3038 (gdb)
suricata --build-info This is Suricata version 5.0.0-dev (rev 7ccf14bc6) Features: NFQ 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: none Atomic intrisics: 1 2 4 8 byte(s) 64-bits, Little-endian architecture GCC version 6.3.0 20170516, C version 199901 compiled with -fstack-protector-all compiled with _FORTIFY_SOURCE=2 L1 cache line size (CLS)=64 thread local storage method: __thread compiled with LibHTP v0.5.30, linked against LibHTP v0.5.30 Suricata Configuration: AF_PACKET support: yes eBPF support: no XDP support: no PF_RING support: no NFQueue support: yes 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 GeoIP2 support: yes Non-bundled htp: yes Old barnyard2 support: no Hyperscan support: yes Libnet support: yes liblz4 support: no Rust support: yes Rust strict mode: no Rust debug mode: no Rust compiler: rustc 1.24.1 Rust cargo: cargo 0.25.0 Python support: yes Python path: /usr/bin/python3 Python version: Python 3.5.3 Python distutils yes Python yaml no Install suricatactl: yes Install suricatasc: yes Install suricata-update: not bundled Profiling enabled: no Profiling locks enabled: no Development settings: Coccinelle / spatch: no Unit tests enabled: no Debug output enabled: no Debug validation enabled: no Generic build parameters: Installation prefix: /opt/suritest Configuration directory: /opt/suritest/etc/suricata/ Log directory: /opt/suritest/var/log/suricata/ --prefix /opt/suritest --sysconfdir /opt/suritest/etc --localstatedir /opt/suritest/var --datarootdir /opt/suritest/share Host: x86_64-pc-linux-gnu Compiler: gcc (exec name) / gcc (real) GCC Protect enabled: yes GCC march native enabled: no 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 -I${srcdir}/../rust/gen/c-headers PCAP_CFLAGS -I/usr/include SECCFLAGS -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
I have a full core and the pcaps and can share any info needed.
Updated by Victor Julien over 5 years ago
- Is duplicate of Bug #2802: iprep: use_cnt can get desynchronized (SIGABRT) added
Updated by Victor Julien over 5 years ago
- Status changed from New to Closed
- Assignee deleted (
OISF Dev) - Target version deleted (
TBD)
Closed as duplicate of #2802