View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003896 | unreal | ircd | public | 2010-03-26 19:51 | 2010-06-20 00:05 |
Reporter | argvx | Assigned To | ohnobinki | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 3.2.9-RC1 | ||||
Summary | 0003896: any unknown options in ssl::options make ircd to crash | ||||
Description | example: set { ssl { options { certificate "server.cert.pem"; key "server.key.pem"; test; }; }; }; where 'test;' is for crash test =) | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
fixed it, replace: else if (!strcmp(cepp->ce_varname, "options")) { CheckDuplicate(cep, ssl_options, "ssl::options"); for (ceppp = cepp->ce_entries; ceppp; ceppp = ceppp->ce_next) { for (ofl = _SSLFlags; ofl->name; ofl++) { if (!strcmp(ceppp->ce_varname, ofl->name)) { break; } } } if (ofl && !ofl->name) { config_error("%s:%i: unknown SSL flag '%s'", ceppp->ce_fileptr->cf_filename, ceppp->ce_varlinenum, ceppp->ce_varname); } } with: else if (!strcmp(cepp->ce_varname, "options")) { CheckDuplicate(cep, ssl_options, "ssl::options"); for (ceppp = cepp->ce_entries; ceppp; ceppp = ceppp->ce_next) { for (ofl = _SSLFlags; ofl->name; ofl++) { if (!strcmp(ceppp->ce_varname, ofl->name)) { break; } } if (ofl && !ofl->name) { config_error("%s:%i: unknown SSL flag '%s'", ceppp->ce_fileptr->cf_filename, ceppp->ce_varlinenum, ceppp->ce_varname); } } } after seeing this, the one question, what smoking one who wrote this code?! |
|
BTW, in your example of a bad config file, unrealircd should crash on ``certificate'' because ``certificate'' is not a valid SSL flag. I took the liberty to fix the bug in a different way than you pasted so that it would match the other, non-bugged options {}. Thanks for reporting! - Handle bad flags in set::ssl::options better (0003896). |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-03-26 19:51 | argvx | New Issue | |
2010-03-26 20:45 | argvx | Note Added: 0016047 | |
2010-03-28 20:45 | syzop | Status | new => acknowledged |
2010-03-28 20:45 | syzop | Relationship added | child of 0003776 |
2010-06-20 00:04 | ohnobinki | QA | => Not touched yet by developer |
2010-06-20 00:04 | ohnobinki | U4: Need for upstream patch | => No need for upstream InspIRCd patch |
2010-06-20 00:04 | ohnobinki | Note Added: 0016119 | |
2010-06-20 00:04 | ohnobinki | Status | acknowledged => resolved |
2010-06-20 00:04 | ohnobinki | Fixed in Version | => 3.2.9-RC1 |
2010-06-20 00:04 | ohnobinki | Resolution | open => fixed |
2010-06-20 00:04 | ohnobinki | Assigned To | => ohnobinki |