CVE-2023-28320 - siglongjmp race condition
libcurl's synchronous hostname resolver used a global buffer without mutex protection while timing out slow operations with alarm() and siglongjmp(). A multi-threaded application could therefore crash or otherwise misbehave.
- Triaged in 7 hours
- Fixed in 9 days
- Paid in 9 days
- Disclosed after 9 days
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.
Impact
Denial of service due to a crash (likely) or possibly other impacts.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a global buffer shared between threads was accessed without a mutex while a signal-driven timeout path (alarm and siglongjmp) could run concurrently.
Impact
A multi-threaded application using the synchronous resolver could crash, causing denial of service, or possibly suffer other impacts.
What the attacker needed
Libcurl built with synchronous resolver; multi-threaded application; slow name resolution
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program looks up a hostname, it can take a long time. libcurl can interrupt that lookup using a timer signal, but the code that handles the interruption shares a single memory area across all threads without a lock. If two threads use it at once, the program can crash.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.