Please donate a few minutes of your time to the curl user survey 2024
curl / Docs / curl CVEs / siglongjmp race condition
Awarded 480 USD


siglongjmp race condition

Project curl Security Advisory, May 17th 2023 - Permalink


libcurl provides several different backends for resolving host names, selected at build time. If it is built to use the synchronous resolver, it allows name resolves to time-out slow operations using alarm() and siglongjmp().

When doing this, libcurl used a global buffer that was not mutex protected and a multi-threaded application might therefore crash or otherwise misbehave.


Most platforms and systems build libcurl to use the threaded resolver or with c-ares, neither of those suffer from this flaw. Most platforms that build with the synchronous resolver don't feature alarm() and siglongjmp() and therefor are not vulnerable either.

Since alarm() uses signals, it is not advisable to use in a multi-threaded environment (signals and threads rarely mix very well) which reduces the risk that this flaw hurts many users.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2023-28320 to this issue.

CWE-662: Improper Synchronization

Severity: Low


libcurl is used by many applications, but not always advertised as such!


The fix is to only support this timeout ability if curl has and can properly mutex protect the buffer.


A - Upgrade curl to version 8.1.0

B - Apply the patch to your local version

C - Do not use the synchronous name resolver option


This issue was reported to the curl project on April 2 2023. We contacted distros@openwall on May 9, 2023.

curl 8.1.0 was released on May 17 2023, coordinated with the publication of this advisory.


Thanks a lot!