CVE-2022-27782: TLS and SSH connection too eager reuse
What the report claims
Curl reuses TLS connections even when security-related options like CURLOPT_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS, CURLOPT_CRLFILE, or CURLOPT_PROXY_CRLFILE are changed, leading to incorrect security settings being applied to reused connections.
Compare with curl's recorded outcome
Known vulnerability
A real vulnerability: CVE-2022-27782 TLS and SSH connection too eager reuse
Shown for comparison after analysis. The pipeline did not see this label.
ProveIt's finding
The available evidence does not settle the report. A maintainer should investigate.
Why this finding?
- All claims concern whether curl's connection reuse logic compares security-relevant options (SSL_OPTIONS, CRLFILE, AUTO_CLIENT_CERT, etc.) when deciding to reuse a TLS/SSL connection.
- The provided curl source only contains constant definitions (curl.h lines 876, 880, 897), not the connection cache/comparison code (likely in lib/conncache.c, lib/vtls/*, or lib/ssluse.c) that would determine if these options are checked.
- Deterministic checks confirm all cited symbols exist at the target revision, and the report includes concrete reproduction steps, making the claims plausible.
- Without the connection reuse decision code, the claims cannot be confirmed or contradicted from the provided material.
What still needs checking
- The connection reuse/comparison logic (e.g., lib/conncache.c, lib/ssluse.c, or the TLS backend's connection matching functions) is needed to evaluate whether security options are compared before reusing a connection.
How this analysis ran 6 claims · 0 citations verified
Checked against curl master on 2022-05-01 (a7b29122cb35). Dev evaluation split. Citation verification checks that a referenced line was in the evidence; it does not prove the model interpreted it correctly.
Review a draft reply to the reporter
Edit and verify before sending.
Thank you for the detailed report with reproduction steps. To evaluate whether curl's connection reuse logic properly compares security options (SSL_OPTIONS, CRLFILE, AUTO_CLIENT_CERT, etc.), we need to examine the connection cache/comparison code (likely in lib/conncache.c, lib/ssluse.c, or the TLS backend's connection matching functions). The provided source only shows the option constants. Could you point to the specific functions/files where connection reuse decisions are made, or would you be able to provide those code sections?
Inspect all claims and source code 6 claims · 3 code excerpts
Report claims
Curl fails to consider some security related options when reusing TLS connections
Read the reasoning
The claim is about connection reuse logic not considering CURLOPT_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS, CURLOPT_CRLFILE, CURLOPT_PROXY_CRLFILE. The provided source code only shows constant definitions in curl.h (lines 876, 880, 897), not the connection cache/comparison code that would decide whether these options are checked during reuse. The deciding code (likely in lib/conncache.c or lib/vtls/*) is not provided.
TLS connection with lower security (CURLSSLOPT_ALLOW_BEAST, CURLSSLOPT_NO_REVOKE) is reused when it should no longer be
Read the reasoning
The claim about CURLSSLOPT_ALLOW_BEAST and CURLSSLOPT_NO_REVOKE being ignored during connection reuse requires examining the connection comparison logic. Only the constant definitions are provided (curl.h lines 876, 880), not the reuse decision code.
Connection authenticated previously with CURLSSLOPT_AUTO_CLIENT_CERT might be reused for connections that should not be
Read the reasoning
The claim about CURLSSLOPT_AUTO_CLIENT_CERT (curl.h line 897) being ignored during reuse similarly depends on connection comparison logic that is not in the provided source.
CRL file use is ignored because previous connection is reused
Read the reasoning
The claim that CURLOPT_CRLFILE is ignored due to connection reuse cannot be verified without the connection cache/comparison code. Only the symbol existence is confirmed.
Second connection reuses existing connection even though revocation check is no longer requested
Read the reasoning
The claim about revocation check (CURLOPT_SSL_NO_REVOKE / CURLSSLOPT_NO_REVOKE) being ignored on reuse requires the connection reuse logic, which is not provided.
Wrong identity (client certificate) or TLS security options being used for subsequent connections to the same hosts
Read the reasoning
This summary claim about wrong identity or TLS options being reused depends on the same missing connection reuse logic.
Read the original report
Source code
| 876 | #define CURLSSLOPT_ALLOW_BEAST (1<<0) |
| 880 | #define CURLSSLOPT_NO_REVOKE (1<<1) |
Show 1 lines (not cited by the judge)
| 897 | #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5) |