Double free caused by mqtt_doing()
该报告还没有中文解读。
原文摘录
摘自原文(3393 字符中的一小部分)
`mqtt_doing()` (`lib/mqtt.c`) causes a double free under certain conditions. The conditions are (1) an `mqtt_send()` is unable to send its entire buffer at one time; and (2) the next call to `mqtt_send()` fails. The bug arises because `mqtt_doing()` `free()`s the pointer `mq->sendleftovers` without …
原文中的代码
740: static CURLcode mqtt_doing(struct Curl_easy *data, bool *done)
741: {
...
751: if(mq->nsend) {
752: /* send the remainder of an outgoing packet */
753: char *ptr = mq->sendleftovers;
754: result = mqtt_send(data, mq->sendleftovers, mq->nsend);
755: free(ptr);
756: …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 curl 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @tdp3kel9g · 版权归作者与 curl 所有