aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/ech
Commit message (Collapse)AuthorAgeFilesLines
* ech: check memory failure in vpm allocation in store final checkJakub Zelenka2026-07-271-0/+4
| | | | | | | | | | | This fixes issue found by fuzz test in updated corpora for echconfiglist_parser. Reviewed-by: Norbert Pocs <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Mon Jul 27 16:36:15 2026 (Merged from https://github.com/openssl/openssl/pull/32070)
* Use %zu for printing size_t valuesAndrew Dinh2026-06-151-2/+2
| | | | | | | | Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Milan Broz <[email protected]> MergeDate: Mon Jun 15 19:24:43 2026 (Merged from https://github.com/openssl/openssl/pull/31454)
* Make ssl includes self-containedBob Beck2026-05-061-0/+4
| | | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> MergeDate: Wed May 6 11:35:50 2026 (Merged from https://github.com/openssl/openssl/pull/31001)
* curl ECH+QUIC fixsftcd2026-04-112-2/+3
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Sat Apr 11 18:29:37 2026 (Merged from https://github.com/openssl/openssl/pull/30727)
* ECH: conformance test changes for echspec test toolsftcd2026-04-083-33/+50
| | | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 8 08:59:20 2026 (Merged from https://github.com/openssl/openssl/pull/30419)
* ECH: Conformance test changes in response to AISLE reviewsftcd2026-04-083-57/+107
| | | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 8 08:59:19 2026 (Merged from https://github.com/openssl/openssl/pull/30419)
* ech: fix off-by-one in hpke_decrypt_encch extensions length bounds checkDaniel Cuthbert2026-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bounds check before reading the two-byte extensions length field uses extsoffset + 1 instead of extsoffset + 2: if ((extsoffset + 1) > clearlen) { goto paderr; } extslen = clear[extsoffset] * 256 + clear[extsoffset + 1]; When extsoffset == clearlen - 1 the check passes, but the second read clear[extsoffset + 1] is clear[clearlen], which is one byte beyond the decrypted plaintext. The allocation is OPENSSL_malloc(cipherlen) where cipherlen = clearlen + AEAD_overhead, so the address is valid, but the byte is uninitialised after OSSL_HPKE_open returns. Using Valgrind confirmed an uninitialised-value read at this location via the full server handshake path: hpke_decrypt_encch (ech_internal.c) ossl_ech_early_decrypt tls_process_client_hello state_machine SSL_do_handshake The subsequent ch_len > clearlen check (line 1875) acts as a safety net and prevents the stale byte from being used further, so the practical impact is a forced decode error rather than memory disclosure. Nevertheless, the read itself is incorrect and should be fixed. Fix: change the guard to extsoffset + 2 so that both bytes of the extensions length field are confirmed to be within the decrypted buffer before either is read. This issue was identified through AI-assisted structural analysis (RAPTOR) using CodeQL database tooling (AST analysis, control flow verification, dominator tree analysis) against the OpenSSL master branch. The off-by-one was confirmed via AST inspection showing GT(Add(extsoffset, 1), clearlen) instead of the expected GT(Add(extsoffset, 2), clearlen). Found by myself @danielcuthbert and validated by Benjamin Rodes - Microsoft @bdrodes. CLA: trivial Fixes: 6c3edd4f3a8a "Add server-side handling of Encrypted Client Hello" Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Fri Mar 20 18:07:01 2026 (Merged from https://github.com/openssl/openssl/pull/30472)
* ECH: chunk-size bug fix and non-regression changessftcd2026-03-191-1/+1
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Thu Mar 19 10:35:56 2026 (Merged from https://github.com/openssl/openssl/pull/30417)
* Copyright year updatesopenssl-machine2026-03-105-5/+5
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Eugene Syromiatnikov <[email protected]> MergeDate: Tue Mar 10 14:37:54 2026 Release: yes
* add check before releaseing retry-configssftcd2026-03-022-0/+18
| | | | | | | Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Mon Mar 2 09:55:44 2026 (Merged from https://github.com/openssl/openssl/pull/30175)
* ssl/ech/ech_store.c: use OPENSSL_malloc_array() in ech_decode_one_entry()Eugene Syromiatnikov2026-02-251-1/+1
| | | | | | | | | | | | Use OPENSSL_malloc_array() for ee->suites array allocation, as it is more semantically sound and performs a size overflow check. Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:20:15 2026 (Merged from https://github.com/openssl/openssl/pull/30146)
* ssl/ech/ech_store.c: do not raise errors on allocation failuresEugene Syromiatnikov2026-02-251-19/+6
| | | | | | | | | | | | | | | The default CRYPTO_malloc() implementation (with OPENSSL_malloc() and OPENSSL_zalloc() being wrappers for it) raises an error on allocation, and both OPENSSL_strdup() and OPENSSL_memdup() use CRYPTO_malloc() internally for memory allocation, so there is no need to explicitly raise an error on an allocation failure; remove these. Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:20:14 2026 (Merged from https://github.com/openssl/openssl/pull/30146)
* ssl/ech/ech_store.c: avoid NULL dereference in ech_decode_one_entry()Eugene Syromiatnikov2026-02-251-1/+5
| | | | | | | | | | | | | | Do not jump to the err label on rent NULL check failure (where it is dereferenced) and rather return immediately. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681462 Fixes: 4af71a77387c "ECH CLI implementation" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:52 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_store.c: avoid uninitialised WPACKET use in OSSL_ECHSTORE_new_configEugene Syromiatnikov2026-02-251-2/+3
| | | | | | | | | | | | | | Do not call WPACKET_cleanup() in case of WPACKET_init() failure and earlier errors. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681459 Fixes: 4af71a77387c "ECH CLI implementation" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:51 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_store.c: avoid memory leak on error path in OSSL_ECHSTORE_newEugene Syromiatnikov2026-02-251-0/+1
| | | | | | | | | | | | | | Free the newly allocated OSSL_ECHSTORE in case of propq duplication failure before return. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681457 Fixes: 7debe0ddeff7 "ECH external APIs" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:50 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: avoid memory leak on ech_decode_inbound_ech() error pathEugene Syromiatnikov2026-02-251-0/+1
| | | | | | | | | | | | | Free allocated tmpenc in case of subsequent PACKET_copy_bytes() failure. Reolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681456 Fixes: 6c3edd4f3a8a "Add server-side handling of Encrypted Client Hello" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:49 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: avoid NULL dereference in ossl_ech_get_ch_offsetsEugene Syromiatnikov2026-02-251-1/+3
| | | | | | | | | | | | | Do not call SSLfatal with s that can potentially be NULL. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681455 Fixes: 6c3edd4f3a8a "Add server-side handling of Encrypted Client Hello" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:47 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: avoid truncating time_t value in ossl_ech_status_printEugene Syromiatnikov2026-02-251-2/+2
| | | | | | | | | | | | | | Avoid casting time_t (that is almost universally 64-bit nowadays) to (32-bit) int and cast it to long long instead. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681453 Fixes: ade10c5dbf20 "ECH client side" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:46 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_store.c: check WPACKET_get_total_written return valueEugene Syromiatnikov2026-02-251-2/+8
| | | | | | | | | | | | | | Check the return value of check WPACKET_get_total_written() call in OSSL_ECHSTORE_new_config() and OSSL_ECHSTORE_write_pem(), and error out on failure. References: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681451 Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:45 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: avoid memory leak in ossl_ech_get_retry_configs()Eugene Syromiatnikov2026-02-251-1/+1
| | | | | | | | | | | | | | Free the temporarily allocated memory before returning on failed size overflow check. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681458 Fixes: 0bdae603e82f "ossl_ech_get_retry_configs(): Check for integer overflow" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:43 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: check WPACKET_get_total_written in ossl_ech_send_greaseEugene Syromiatnikov2026-02-251-2/+8
| | | | | | | | | | | | | | Check the result of WPACKET_get_total_written() calls in ossl_ech_send_grease(), as is done elsewhere. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681451 Fixes: ade10c5dbf20 "ECH client side" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:42 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ssl/ech/ech_internal.c: avoid superfluous extval check in ossl_ech_early_decryptEugene Syromiatnikov2026-02-251-5/+3
| | | | | | | | | | | | | | Remove superfluous extval NULL check on success path, as it cannot be NULL, and is already dereferenced earlier. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681447 Fixes: 6c3edd4f3a8a "Add server-side handling of Encrypted Client Hello" Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Feb 25 11:10:41 2026 (Merged from https://github.com/openssl/openssl/pull/30139)
* ECH: change from I-D to RFC 9849 and resolve TODO(ECH) casessftcd2026-02-202-12/+8
| | | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Thu Feb 19 09:22:37 2026 (Merged from https://github.com/openssl/openssl/pull/30048)
* ech_check_format(): Fix potential out of bounds readsftcd2026-02-201-5/+12
| | | | | | | | | | | strspn() is called on likely non-NUL-terminated BIO buffer. Copy it and add NUL-termination before calling the function. Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Thu Feb 19 09:17:54 2026 (Merged from https://github.com/openssl/openssl/pull/30050)
* Add tests and documentation and fix a couple of issues identified by added testssftcd2026-02-205-45/+38
| | | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Mon Feb 16 15:41:15 2026 (Merged from https://github.com/openssl/openssl/pull/29200)
* ossl_ech_get_retry_configs(): Check for integer overflowsftcd2026-02-201-0/+2
| | | | | | | | | Fixes DEF-02-010 Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Wed Feb 11 17:19:16 2026 (Merged from https://github.com/openssl/openssl/pull/29593)
* ech_read_priv_echconfiglist(): Pass encodedlen to BIO_new_mem_buf()sftcd2026-02-201-1/+1
| | | | | | | | | Fixes DEF-02-001 Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Wed Feb 11 17:19:08 2026 (Merged from https://github.com/openssl/openssl/pull/29593)
* ECH: Properly apply libctx and propq from SSL_CTXTomas Mraz2026-02-201-15/+13
| | | | | | | | | And further minor refactoring. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Dmitry Belyavskiy <[email protected]> MergeDate: Thu Jan 8 09:59:56 2026 (Merged from https://github.com/openssl/openssl/pull/29439)
* s_client and s_server options for ECHsftcd2026-02-203-8/+11
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28270)
* Fix a client-auth bug introduced by ECH codesftcd2026-02-201-10/+13
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28555)
* ech_store.c: Fix casts and avoid leaks on error returnTomas Mraz2026-02-201-12/+21
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28611)
* ech_ssl_apis.c: Check some invalid argument passingTomas Mraz2026-02-201-6/+9
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28611)
* Fix warnings about casts in ECH codeTomas Mraz2026-02-202-9/+10
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from https://github.com/openssl/openssl/pull/28611)
* Add server-side handling of Encrypted Client Hellosftcd2026-02-203-12/+1170
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27561)
* ECH client support for sending multiple key sharessftcd2026-02-202-10/+57
| | | | | | Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from https://github.com/openssl/openssl/pull/27540)
* ECH client side transcript refactorsftcd2026-02-205-635/+284
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26011)
* ECH client sidesftcd2026-02-204-9/+1495
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/26011)
* ECH external APIssftcd2026-02-204-146/+698
| | | | | | Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/25663)
* ECH CLI implementationsftcd2026-02-206-0/+1414
Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from https://github.com/openssl/openssl/pull/25420)