← Commit list

86b39c2226

Daniel Stenberg
Daniel Stenberg
2026-03-27
SUCCESS Duration: 257s

Subject

transfer: clear the URL pointer in OOM to avoid UAF

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/transfer.c+2 -0
@@ -469,6 +469,8 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
uc = curl_url_get(data->set.uh,
CURLUPART_URL, &data->set.str[STRING_SET_URL], 0);
if(uc) {
+ /* clear the pointer to not point to freed memory anymore */
+ Curl_bufref_set(&data->state.url, NULL, 0, NULL);
failf(data, "No URL set");
return CURLE_URL_MALFORMAT;
}