When sending data to an MQTT server, libcurl could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
{
"package": "curl",
"last_affected": "7.78.0",
"affects": "both",
"URL": "https://curl.se/docs/CVE-2021-22945.json",
"www": "https://curl.se/docs/CVE-2021-22945.html",
"issue": "https://hackerone.com/reports/1269242",
"CWE": {
"desc": "Double Free",
"id": "CWE-415"
},
"severity": "Medium",
"award": {
"currency": "USD",
"amount": "1000"
}
}[
{
"digest": {
"line_hashes": [
"328453786080658004361491463965998398485",
"252156255408452342459258152853300683062",
"171447148363748109589151842825259079707",
"175104515688157307960582739896490386086"
],
"threshold": 0.9
},
"target": {
"file": "lib/mqtt.c"
},
"deprecated": false,
"id": "CURL-CVE-2021-22945-396483fd",
"signature_version": "v1",
"signature_type": "Line",
"source": "https://github.com/curl/curl.git/commit/43157490a5054bd24256fe12876931e8abc9df49"
},
{
"digest": {
"length": 560.0,
"function_hash": "258886550320820673026644183473732966147"
},
"target": {
"file": "lib/mqtt.c",
"function": "mqtt_send"
},
"deprecated": false,
"id": "CURL-CVE-2021-22945-49a9eb3b",
"signature_version": "v1",
"signature_type": "Function",
"source": "https://github.com/curl/curl.git/commit/43157490a5054bd24256fe12876931e8abc9df49"
}
]