#  CVE-2023-28320 - siglongjmp race condition

libcurl's synchronous resolver used an unprotected global buffer with alarm()/siglongjmp() timeout handling, letting multithreaded apps crash or misbehave.

- Payout: $480
- Severity: low
- Program: Internet Bug Bounty
- Found by: nyymi
- Disclosed: 2023-05-26
- CVE: CVE-2023-28320
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1990421
- Library page: https://bugbountylibrary.com/r/h1%3A1990421
- Tags: area:oss domain:oss impact:dos kind:bounty platform:hackerone sev:low tech:curl technique:source-review vuln:dos vuln:race-condition

**Target:** libcurl synchronous hostname resolver (alarm/siglongjmp timeout path)
**Root cause:** The synchronous resolver's timeout mechanism uses alarm() and siglongjmp() while sharing a global buffer that is not mutex-protected, so concurrent threads race on it.
**Steps:**
1. Build libcurl with the synchronous resolver backend.
2. Run a multithreaded application that performs concurrent name resolves.
3. Trigger slow resolves so the alarm()/siglongjmp() timeout path fires while another thread touches the shared global buffer.
4. Observe crash or undefined behavior from the unsynchronized access.
**How found:** Code review of the synchronous resolver's timeout handling revealed the global buffer lacked mutex protection.
**Exploitation:** Requires a multithreaded application using libcurl's synchronous resolver; concurrent slow resolves trigger the timeout path and race on the global buffer, causing a crash (DoS).
**Insight:** When auditing libraries for thread safety, focus on signal-based timeout paths (alarm/siglongjmp) that jump out of normal control flow and bypass locking around shared globals.

