Actions
Bug #4863
closedsuricata segfault on smb packet
Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:
Description
# suricata --build-info
This is Suricata version 6.0.4 RELEASE
Features: DEBUG NFQ PCAP_SET_BUFF AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT HAVE_NSS HAVE_LIBJANSSON TLS TLS_C11 MAGIC RUST
SIMD support: none
Atomic intrinsics: 1 2 4 8 byte(s)
64-bits, Little-endian architecture
GCC version 11.2.0, C version 201112
compiled with -fstack-protector
compiled with _FORTIFY_SOURCE=2
L1 cache line size (CLS)=64
thread local storage method: _Thread_local
compiled with LibHTP v0.5.39, linked against LibHTP v0.5.39
Suricata Configuration:
AF_PACKET support: yes
eBPF support: yes
XDP support: yes
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
hiredis support: no
hiredis async with libevent: no
Prelude support: no
PCRE jit: yes
LUA support: no
libluajit: no
GeoIP2 support: no
Non-bundled htp: yes
Hyperscan support: no
Libnet support: yes
liblz4 support: yes
HTTP2 decompression: no
Rust support: yes
Rust strict mode: no
Rust compiler path: /usr/bin/rustc
Rust compiler version: rustc 1.53.0 (53cb7b09b 2021-06-17)
Cargo path: /usr/bin/cargo
Cargo version: cargo 1.53.0 (4369396ce 2021-04-27)
Cargo vendor: yes
Python support: yes
Python path: /var/tmp/portage/net-analyzer/suricata-6.0.4/temp/python3.9/bin/python3
Python distutils yes
Python yaml yes
Install suricatactl: yes
Install suricatasc: yes
Install suricata-update: yes
Profiling enabled: no
Profiling locks enabled: no
Plugin support (experimental): yes
Development settings:
Coccinelle / spatch: no
Unit tests enabled: no
Debug output enabled: yes
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: x86_64-pc-linux-gnu-gcc (exec name) / x86_64-pc-linux-gnu-g++ (real)
GCC Protect enabled: yes
GCC march native enabled: no
GCC Profile enabled: no
Position Independent Executable enabled: yes
CFLAGS -ggdb -O0 -std=c11 -I${srcdir}/../rust/gen -I${srcdir}/../rust/dist
PCAP_CFLAGS
SECCFLAGS -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
Files
Updated by Alexander Miroshnichenko about 3 years ago
[5310577.942529] W#28[264672]: segfault at 7f02079fe010 ip 00007f054cfae6fd sp 00007f04b0d32988 error 6 in libc-2.33.so[7f054ce76000+145000]
[5310577.942546] Code: 01 00 00 48 83 fa 40 77 77 c5 fe 7f 44 17 e0 c5 fe 7f 07 c5 f8 77 c3 66 0f 1f 44 00 00 c5 f8 77 48 89 d1 40 0f b6 c6 48 89 fa <f3> aa 48 89 d0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 39 d1
Updated by Alexander Miroshnichenko about 3 years ago
(gdb) f 1
#1 0x0000561c478927f9 in Grow (sb=0x7f047a8e1d40) at util-streaming-buffer.c:504
504 util-streaming-buffer.c: No such file or directory.
(gdb) p *sb
$1 = {cfg = 0x561c48289d00 <sbcfg>, stream_offset = 0, buf = 0x7f01865fd010 "MSSQLBAK\002", buf_size = 2776629248, buf_offset = 2776629248, sbb_tree = {rbh_root = 0x0}, head = 0x0, sbb_size = 0, buf_size_max = 2776629248}
(gdb) f 2
#2 0x0000561c47892e2b in StreamingBufferAppendNoTrack (sb=0x7f047a8e1d40,
data=0x7f047b258476 "A\234\245T\273\245c\342\030\203a\214\200;\023\244,\200\277\216\002\256\060D\340\223q$`{H\240\224\323P%\v\301Xs\006\060(\305\066\006c\274,\211\340\037?\240\372\207\273\302\330\372\351?\034\067",
data_len=753) at util-streaming-buffer.c:649
649 in util-streaming-buffer.c
(gdb) p *sb
$2 = {cfg = 0x561c48289d00 <sbcfg>, stream_offset = 0, buf = 0x7f01865fd010 "MSSQLBAK\002", buf_size = 2776629248, buf_offset = 2776629248, sbb_tree = {rbh_root = 0x0}, head = 0x0, sbb_size = 0, buf_size_max = 2776629248}
(gdb) f 3
#3 0x0000561c47863b6d in AppendData (file=0x7f047a94c440,
data=0x7f047b258476 "A\234\245T\273\245c\342\030\203a\214\200;\023\244,\200\277\216\002\256\060D\340\223q$`{H\240\224\323P%\v\301Xs\006\060(\305\066\006c\274,\211\340\037?\240\372\207\273\302\330\372\351?\034\067",
data_len=753) at util-file.c:610
610 util-file.c: No such file or directory.
(gdb) p *file
$3 = {flags = 8790, name_len = 44, state = FILE_STATE_OPENED, sb = 0x7f047a8e1d40, txid = 153, file_track_id = 154, file_store_id = 0, fd = -1, name = 0x7f047a718df0 "UBS\\UBS_backup_2021_12_02_020001_2573086.bak",
magic = 0x0, next = 0x0, md5_ctx = 0x0, md5 = '\000' <repeats 15 times>, sha1_ctx = 0x0, sha1 = '\000' <repeats 19 times>, sha256_ctx = 0x0, sha256 = '\000' <repeats 31 times>, content_inspected = 0, content_stored = 0,
size = 2776630001, inspect_window = 0, inspect_min_size = 0, start = 0, end = 0, sid = 0x7f047a7821e0, sid_cnt = 0, sid_max = 8}
Updated by Victor Julien about 3 years ago
Are you able to reproduce this using a pcap? If so, can you share a pcap?
Updated by Victor Julien about 2 years ago
- Related to Security #5700: SCRealloc of large chunk crashes Suricata added
Updated by Victor Julien about 2 years ago
- Related to Security #5703: smb: crash inside of streaming buffer Grow() added
Updated by Victor Julien almost 2 years ago
- Status changed from New to Rejected
Closing as duplicate of #5703
Actions