View Issue Details

IDProjectCategoryView StatusLast Update
0005052unrealircdpublic2018-03-25 13:42
ReporterSkizzerz Assigned Tosyzop  
PrioritylowSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.0.17 
Fixed in Version4.0.18 
Summary0005052: Segfault when parsing poorly-formed conf file
DescriptionCertain options (I tried with set::hide-ban-reason, but others may cause issues as well) will cause segfaults if their value is not specified in unrealircd.conf. Ideally, these will cause the program to display a useful error message rather than simply crashing so that the sysadmin knows what to fix in the conf file.
Steps To Reproduce1. Add the following to unrealircd.conf:
set {
    hide-ban-reason; // note: the proper way to specify this is hide-ban-reason yes; -- omitting the "yes" causes segfault
};

2. ./unrealircd start
3. It segfaults. Ideally it would yell at you for getting the conf file wrong instead and point to the line in question.
Additional InformationIssue comes from attempting to call strdup() on a NULL pointer. Line in question was at s_conf.c:7495: tempiConf.hide_ban_reason = config_checkval(cep->ce_vardata, CFG_YESNO); -- cep->ce_vardata was NULL in this instance.
TagsNo tags attached.
3rd party modules

Activities

syzop

2018-03-25 13:42

administrator   ~0020070

Thanks for the report. There was indeed a missing check :)

https://github.com/unrealircd/unrealircd/commit/15bf82d3c1855c027fc9380a7db6a4f02eb202be

Issue History

Date Modified Username Field Change
2018-01-05 16:01 Skizzerz New Issue
2018-03-25 13:42 syzop Assigned To => syzop
2018-03-25 13:42 syzop Status new => resolved
2018-03-25 13:42 syzop Resolution open => fixed
2018-03-25 13:42 syzop Fixed in Version => 4.0.18
2018-03-25 13:42 syzop Note Added: 0020070