Bug 5762 - syslogd segfaults when parsing a bad /etc/syslog.conf
Summary: syslogd segfaults when parsing a bad /etc/syslog.conf
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-06 17:30 UTC by dickelbeck
Modified: 2013-01-20 15:06 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
patch which fixes the bug (712 bytes, patch)
2012-12-06 17:31 UTC, dickelbeck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dickelbeck 2012-12-06 17:30:01 UTC
Re: Busybox 1.20.2

If you don't pass the name of the /etc/syslog.conf file in as a syslod command line option, then there is an error parsing the file, you get a segfault, because "file" is still set to NULL.

Attached is a patch which fixes it.
Comment 1 dickelbeck 2012-12-06 17:31:23 UTC
Created attachment 4676 [details]
patch which fixes the bug
Comment 2 Denys Vlasenko 2013-01-20 15:06:51 UTC
Fixed in git:

commit 81fa999540740b5269a349a9e991eb506592ea75
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Sun Jan 20 16:05:41 2013 +0100

    syslogd: do not segfault on parse error when using default config