summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-08-14quicserver.c: Use BIO_printf to stderr instead of plain printfTomas Mraz
Fixes #21623 Also do not build quicserver with no-stdio as it is a test utility and tests are disabled with no-stdio anyway. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/21677)
2023-08-14Don't call ossl_assert on the result of bn_wexpandMatt Caswell
bn_wexpand can fail as the result of a memory allocation failure. We should not be calling ossl_assert() on its result because it can fail in normal operation. Found via the reproducible error injection in #21668 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/21725)
2023-08-10Minor fixesHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC CHANNEL: Tune RXFC default parametersHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Fix double close of FD (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC UINT_SET: Fix null dereference (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TSERVER: Handle return value correctly (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC APL: Add missing unlock call (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC: Check block_until_pred return value in shutdown (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC QTX: Handle negative IV values correctly (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC QTLS: Fix NULL dereference (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC QRX: Handle negative IV length values correctly (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC CC TEST: Fix memory leakHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10EVENT QUEUE: Fix memory leak (coverity)Hugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC FIFD: CoverityHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC FC: TEST: CoverityHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Coverity - Ensure stream names are non-NULLHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC SSTREAM: Fix test which was not being executed fullyHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC UINT_SET: Fix regression after list refactorHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TXP: Re-enable accidentially disabled testsHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: STREAM, MAX_DATA and MAX_STREAM_DATA testingHugo Landau
Fixes https://github.com/openssl/project/issues/76 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TXP: Fix bug where TXPIM PKT could be used after freeHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: RESET_STREAM, STOP_SENDINGHugo Landau
Fixes https://github.com/openssl/project/issues/80 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Connection closure reason testingHugo Landau
Fixes https://github.com/openssl/project/issues/82 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC APL/CHANNEL: Wire up connection closure reasonHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Test repeated HANDSHAKE_DONE, non-minimal encodingHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Test NEW_CONN_ID framesHugo Landau
Fixes https://github.com/openssl/project/issues/86 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Test malformed crypto stream data, excess bufferingHugo Landau
Fixes https://github.com/openssl/project/issues/85 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Ensure bogus BLOCKED frames are ignoredHugo Landau
Fixes https://github.com/openssl/project/issues/81 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Ensure PATH_RESPONSE is ignoredHugo Landau
Fixes https://github.com/openssl/project/issues/77 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Test ACK frame generationHugo Landau
Fixes https://github.com/openssl/project/issues/75 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Ensure PING causes ACK generationHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10QUIC TEST: Fault Injection: PADDINGHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10OSSL_HTTP_{REQ_CTX_set_request_line(),_set1_request()}: backward compat ↵Dr. David von Oheimb
w.r.t. path parameter Fixes #17923 Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21690)
2023-08-10Fix an init-deadlock in OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS)Bernd Edlinger
A recursive OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS) call may happen if an out-of-memory error happens at the first callstack, and the dead-lock happens at the second callstack, because ossl_err_get_state_int calls OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS) although that call is currently already executing. At least on posix system this causes the process to freeze at this point, and must be avoided whatever it takes. The fix is using err_shelve_state around the critical region, which makes ossl_err_get_state_int return early and not call the recursive OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS). This can be reproduced with my error injection patch. The test vector has been validated on the master branch: $ ERROR_INJECT=1692279870 ../util/shlib_wrap.sh ./asn1parse-test ./corpora/asn1parse/027f6e82ba01d9db9a9167b83e56cc9f2c602550 ERROR_INJECT=1692279870 #0 0x7f280b42fef8 in __sanitizer_print_stack_trace ../../../../src/libsanitizer/asan/asan_stack.cpp:86 #1 0x5610a3f396b4 in my_malloc fuzz/test-corpus.c:114 #2 0x7f280a2eb94c in CRYPTO_malloc crypto/mem.c:177 #3 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114 #4 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264 #5 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259 #6 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301 #7 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233 #8 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109 #9 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190 #10 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181 #11 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67) #12 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154 #13 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553 #14 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29 #15 0x5610a3f38783 in main fuzz/test-corpus.c:194 #16 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #17 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #18 0x5610a3f38d34 in _start (/home/runner/work/openssl/openssl/fuzz/asn1parse-test+0x3d34) AddressSanitizer:DEADLYSIGNAL ================================================================= ==27629==ERROR: AddressSanitizer: ABRT on unknown address 0x03e900006e23 (pc 0x7f2808cfbef8 bp 0x7f280b36afe0 sp 0x7ffd545b2460 T0) #0 0x7f2808cfbef8 (/lib/x86_64-linux-gnu/libc.so.6+0x99ef8) #1 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154 #2 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553 #3 0x7f280a1c935e in ossl_err_get_state_int crypto/err/err.c:705 #4 0x7f280a1cf1f9 in ERR_new crypto/err/err_blocks.c:20 #5 0x7f280a2eb9ac in CRYPTO_malloc crypto/mem.c:205 #6 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114 #7 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264 #8 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259 #9 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301 #10 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233 #11 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109 #12 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190 #13 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181 #14 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67) #15 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154 #16 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553 #17 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29 #18 0x5610a3f38783 in main fuzz/test-corpus.c:194 #19 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #20 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #21 0x5610a3f38d34 in _start (/home/runner/work/openssl/openssl/fuzz/asn1parse-test+0x3d34) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: ABRT (/lib/x86_64-linux-gnu/libc.so.6+0x99ef8) ==27629==ABORTING Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/21683)
2023-08-10Don't use C++ reserved word template for function argumentsMscVZoltan
CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21692)
2023-08-10Do not raise CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA error in CMS_ContentInfo_freeOlga Batyshkina
This happens if this function is called for signed content. Added ossl_cms_env_enc_content_free() for cleaning enveloped content. Fixed indentation in ossl_cms_env_enc_content_free Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21676)
2023-08-09Fix ChaCha assembly code on 32-bit HPUX itanium systemsBernd Edlinger
This fixes the reported crashes 32-bit HPUX systems due to raw out and inp pointer values, and adds one nop instruction on 64-bit systems, like it is done in other assembly modules for those systems. The fix was tested by @johnkohl-hcl see: https://github.com/openssl/openssl/issues/17067#issuecomment-1668468033 Fixes #17067 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21681)
2023-08-08Fix handling of the "0:" label in arm-xlate.plTom Cosgrove
When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't a label. Correct this by looking at the result of the s/// command. Verified that there are no changes in the .S files created during a normal build, and that the "0:" labels appear in the translation given in the error report (and they are the only difference in the before and after output). Fixes #21647 Change-Id: I5f2440100c62360bf4bdb7c7ece8dddd32553c79 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21653)
2023-08-08make updateMatt Caswell
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Anton Arapov <anton@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21560)
2023-08-08Provide an introductory page to the whole OpenSSL guideMatt Caswell
Supply some initial overview information and some links to the other pages of the guide. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Anton Arapov <anton@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21560)
2023-08-08Incorporate the ssl man page into the OpenSSL guideMatt Caswell
We also rewrite quite a lot of the content to update it for QUIC and to make it flow better as part of the guide. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Anton Arapov <anton@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21560)
2023-08-08Incorporate the crypto man page into the OpenSSL guideMatt Caswell
Some content has been moved out into the general libraries introduction. Reformat and fill in some gaps with what remains. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Anton Arapov <anton@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21560)
2023-08-08Provide an introduction to the OpenSSL librariesMatt Caswell
Give an overview of the two libraries and some key concepts common to both. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Anton Arapov <anton@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21560)
2023-08-08Resolve some of the TODO(QUIC) itemsTomas Mraz
For some of the items we add FUTURE/SERVER/TESTING/MULTIPATH designation to indicate these do not need to be resolved in QUIC MVP release. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21539)
2023-08-08bio_ssl.c: Support most ctrls with QUIC based BIO_SSLTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21539)
2023-08-08QUIC fault testing TODOs are changed into regular commentsTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21539)
2023-08-08QUIC TLS: Rethink error handlingHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21547)
2023-08-08QUIC: Fix nitHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21547)
2023-08-08QUIC: Move string conversion functions into a source fileHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21547)