Description of problem: Just run the following command on a Fedora 23: curl "`perl -e 'print "{a}" x 101'`" Version-Release number of selected component: curl-7.43.0-6.fc23 Additional info: reporter: libreport-2.6.4 backtrace_rating: 4 cmdline: curl {a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a}{a} crash_function: strlen executable: /usr/bin/curl global_pid: 19218 kernel: 4.4.9-300.fc23.x86_64 runlevel: N 5 type: CCpp uid: 1001 Truncated backtrace: Thread no. 1 (7 frames) #0 strlen at ../sysdeps/x86_64/strlen.S:106 #1 __strdup at strdup.c:41 #2 glob_set at tool_urlglob.c:132 #3 glob_parse at tool_urlglob.c:391 #4 glob_url at tool_urlglob.c:435 #5 operate_do at tool_operate.c:452 #6 operate at tool_operate.c:1881
Created attachment 1162717 [details] File: backtrace
Created attachment 1162718 [details] File: cgroup
Created attachment 1162719 [details] File: core_backtrace
Created attachment 1162720 [details] File: dso_list
Created attachment 1162721 [details] File: environ
Created attachment 1162722 [details] File: exploitable
Created attachment 1162723 [details] File: limits
Created attachment 1162724 [details] File: maps
Created attachment 1162725 [details] File: mountinfo
Created attachment 1162726 [details] File: namespaces
Created attachment 1162727 [details] File: open_fds
Created attachment 1162728 [details] File: proc_pid_status
Created attachment 1162729 [details] File: var_log_messages
Thank you for reporting the bug! It looks like an obvious off-by-one error: --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -400,9 +400,9 @@ static CURLcode glob_parse(URLGlob *glob, char *pattern, break; } } - if(++glob->size > GLOB_PATTERN_NUM) + if(++glob->size >= GLOB_PATTERN_NUM) return GLOBERROR("too many globs", pos, CURLE_URL_MALFORMAT); } return res; } There is a risk that the issue has impact on security. Please do not share it publicly until it is properly investigated. I will notify curl upstream about this.
upstream commit: https://github.com/curl/curl/commit/584d0121
fixed in curl-7.49.1-2.fc25
curl-7.43.0-7.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-828d573a0f
curl-7.47.1-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-2b2eafcf2f
curl-7.47.1-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-2b2eafcf2f
curl-7.43.0-7.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-828d573a0f
curl-7.43.0-7.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.47.1-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.