Project

General

Profile

Actions

Bug #7769

open

DetectFileHashParse crashes when de_ctx->rule_file is NULL (strdup → SIGSEGV)

Added by Boris Tonofa about 10 hours ago.

Status:
New
Priority:
Normal
Assignee:
Target version:

Description

When Suricata parses rules it invokes DetectFileHashParse() to turn a filemd5/sha1/sha256 keyword into an in-memory hash table. If the rules are supplied from memory, the parser context field de_ctx->rule_file is NULL; nevertheless the code still executes SCStrdup(de_ctx->rule_file). Because strdup(NULL) dereferences a null pointer inside strlen(), Suricata crashes with SIGSEGV during the rule-loading phase.

No data to display

Actions

Also available in: Atom PDF