`Log::delay` with `max_delay_queue_size=0` causes segfault
Author: evantypanskiCreated Sep 30, 2026Updated Sep 30, 2026
LabelsGood First Issue
I found this when LLM vuln scanning.
The following program segfaults when run:
# delay-queue-zero.zeek
module DelayQueueZero;
export {
redef enum Log::ID += { LOG };
type Info: record {
msg: string &log;
};
}
hook Log::log_stream_policy(rec: DelayQueueZero::Info, id: Log::ID)
{
if ( id == DelayQueueZero::LOG )
Log::delay(id, rec);
}
event zeek_init()
{
Log::create_stream(DelayQueueZero::LOG,
[$columns=DelayQueueZero::Info, $path="delay-zero",
$max_delay_queue_size=0]);
Log::write(DelayQueueZero::LOG, [$msg="trigger"]);
}Running it:
$ zeek delay-queue-zero.zeek
warning: unable to evict delayed records for stream DelayQueueZero::LOG queue_size=0, all re-delayed?
[1] 92860 segmentation fault zeek delay-queue-zero.zeekThe crux is the max_delay_queue_size=0 paired with the Log::delay call in the policy hook.
This should not crash, perhaps just ignore the delay. It already warns. I didn't dig too deep.
Source: zeek/zeek