42: `VMS_STS` macro typo (`< 3` vs `<< 3`) turns curl failures into successful OpenVMS conditions
其他弱点 / Improper Check or Handling of Exceptional Conditions / #3973169
该报告还没有中文解读。
原文摘录
摘自原文(6029 字符中的一小部分)
`VMS_STS` in `src/tool_vms.h` line 46 uses a comparison (`< 3`) where a left-shift (`<< 3`) is intended. This causes `VMSSTS_HIDE` to evaluate to `0x10000001` instead of `0x10000000`, setting bit 0 (the OpenVMS success bit). When curl runs under DCL with `--silent` and without `--show-error`, the …
原文中的代码
#define VMS_STS(c, f, e, s) \
((((c) & 0xF) << 28) | \
(((e) & 0x1FFF) < 3) | \
((s) & 7))
#define VMSSTS_HIDE VMS_STS(1, 0, 0, 0)默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 curl 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @giant_anteater · 版权归作者与 curl 所有