Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conf: fix NULL-pointer dereference in CoredumpLoadConfig #2997

Closed
wants to merge 1 commit into from
Closed

conf: fix NULL-pointer dereference in CoredumpLoadConfig #2997

wants to merge 1 commit into from

Commits on Nov 19, 2017

  1. conf: fix NULL-pointer dereference in CoredumpLoadConfig

    An empty value for coredump.max-dump in the config-file leads to a segfault because of a NULL-pointer dereference in CoredumpLoadConfig().
    
    Here is a configuration example:
    
    coredump.max-dump: []
    
    This lets suricata crash with a segfault:
    
    ASAN-output:
    ==9412==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f22e851aa28 bp 0x7ffd90006fc0 sp 0x7ffd90006740 T0)
        0 0x7f22e851aa27 in strcasecmp (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x51a27)
        1 0x5608a7ec0108 in CoredumpLoadConfig /root/suricata-1/src/util-coredump-config.c:52
        2 0x5608a7e8bb22 in PostConfLoadedSetup /root/suricata-1/src/suricata.c:2752
        3 0x5608a7e8c577 in main /root/suricata-1/src/suricata.c:2892
        4 0x7f22e4c622b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
        5 0x5608a7a30c59 in _start (/usr/local/bin/suricata+0xc4c59)
    
    Bug #2276
    whotwagner committed Nov 19, 2017
    Configuration menu
    Copy the full SHA
    725b6f9 View commit details
    Browse the repository at this point in the history