alibaba / alibaba/AliOS-Things
[Bug Report]: Patch for CVE-2020-8177 in reused component curl
- Dominant language
- C
- Stars
- 4.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Contact Details
weitingcai2020@gmail.com
### What happened?
我通过使用V1SCAN(一个扫描存在于复用代码中1-Day漏洞的工具),发现您的项目中components/curl/src/tool_getparam.c文件中的`getparameter`函数可能存在类型为CWE-74 & CWE-99的漏洞,相关触发逻辑类似https://github.com/advisories/GHSA-wqc8-jpfx-w9g4, 具体参考链接如下:
CVE-2020-8177:
NVD说明链接:
https://nvd.nist.gov/vuln/detail/CVE-2020-8177
commit修复链接:
https://github.com/curl/curl/commit/8236aba58542c5
修复方法:
在components/curl/src/tool_getparam.c文件中的getparameter函数中, 在1774 行代码 `case 'i':` 和1775 行代码`config->show_headers = toggle; /* show the headers as well in the` 中间插入如下代码:
```
if(config->content_disposition) {
warnf(global,
"--include and --remote-header-name cannot be combined.\n");
return PARAM_BAD_USE;
}
```
考虑到其可能存在的潜在风险,我愿意配合您以负责任的方式及时核实、解决和报告发现的漏洞。 如果您需要任何进一步的信息或帮助,请随时与我联系。如果需要,我也可以提交PR帮助您修复。 谢谢您,期待尽快收到您的回复!
### Version
master (Default)
### What soultions are you seeing the problem on?
_No response_
### Relevant log output
_No response_
Contributor guide
Research direction
Start in components/curl/src/tool_getparam.c at the getparameter function and review the --include handling around case 'i'. Compare the behavior with CVE-2020-8177 and upstream commit 8236aba58542c5; done means the conflicting options are rejected as described without regressing normal parameter handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100