-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: error_log: better handle invalid error log file name #505
base: trunk
Are you sure you want to change the base?
Conversation
What's an invalid string? Can it be reached via configuration? |
I have the fuzzer corpus on my harddrive, i can send it to you directly or maybe upload somewhere |
server/core.c
Outdated
char *dir; | ||
apr_finfo_t finfo; | ||
apr_status_t rv; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why broader scope for these if still used only within the else?
server/core.c
Outdated
apr_status_t rv = apr_stat(&finfo, dir, APR_FINFO_TYPE, p); | ||
if (!abs) { | ||
ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, 0, | ||
ap_server_conf, APLOGNO(02291) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be APLOGNO()
initially and then can be filled in after committed.
if (!abs) { | ||
ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, 0, | ||
ap_server_conf, APLOGNO(02291) | ||
"Cannot construct error log file path '%s'", s->error_fname); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you include the input that triggers this? Hopefully in a way as simple as httpd.conf content rather than calling these functions directly.
if error log file name is an invalid string, ap_server_root_relative will return NULL, which will result in SIGSEGV in ap_make_dirstr_parent
2a91c15
to
448cea2
Compare
if error log file name is an invalid string, ap_server_root_relative will return NULL, which will result in SIGSEGV in ap_make_dirstr_parent