Project

General

Profile

Actions

Bug #612

closed

FreeBSD DIVERT segfault

Added by Jake Guffey about 12 years ago. Updated about 12 years ago.

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

Description

Version: 1.3.2
OS: FreeBSD 9.0-RELEASE (amd64)
Compiled options: IPFW (+DEBUG)

Brief description of problem: Every time I start suricata using IPFW's divert facility, it segfaults and crashes.

Steps to reproduce:
1. Build suricata with the IPFW option enabled
2. Set up basic configuration (copying suricata.yaml.sample to suricata.yaml works well enough)
3. Configure IPFW with a divert rule (ipfw add 2 divert 8000 ip from any to any)
4. Attempt to execute suricata using IPFW divert (suricata -c /path/to/suricata.yaml -d 8000)
5. SIGSEGV

After trying this multiple times, I recompiled with debugging enabled and opened the core dump in gdb. Stepping through, the error occurs within the strcmp() function referenced on line 196 of source-ipfw.c (within IPFWMutexInit()). The offending ASM instruction is "<strcmp+11> mov (%rsi),%dl." Upon execution of this command, it fails every time it's called from IPFWMutexInit(). Perhaps this is evidence of some kind of stack corruption? The segfault is caused by attempting to dereference the pointer stored in %rsi, but not being able to access such memory.

Is there anything I can do to help figure out what's going on and/or how to fix it?

Thanks,
Jake

Actions

Also available in: Atom PDF