Add callbacks supporting generation and retrieval of supplemental data e... - #7
Closed
scottdeboy wants to merge 3 commits into
Closed
scottdeboy wants to merge 3 commits into
scottdeboy wants to merge 3 commits into
Conversation
…a entries, facilitating RFC 5878 (TLS auth extensions) Removed prior audit proof logic - audit proof support was implemented using the generic TLS extension API Tests exercising the new supplemental data registration and callback api can be found in ssltest.c. Implemented changes to s_server and s_client to exercise supplemental data callbacks via the -auth argument, as well as additional flags to exercise supplemental data being sent only during renegotiation.
…l-data-api Conflicts: ssl/s23_clnt.c ssl/ssl_rsa.c
Contributor
|
Merged around 3608618. |
Closed
This was referenced Jul 24, 2019
Closed
bernd-edlinger
added a commit
to bernd-edlinger/openssl
that referenced
this pull request
Jul 19, 2023
$ ERROR_INJECT=1668583266 ../util/shlib_wrap.sh ./asn1-test ./corpora/asn1/fa3e83c6324c9ae936e6e66b09e155aae02d67ee
#0 0x7f42fc532d4f in __sanitizer_print_stack_trace ../../../../src/libsanitizer/asan/asan_stack.cc:36
openssl#1 0x55c2f6f48bf4 in my_realloc fuzz/test-corpus.c:129
openssl#2 0x7f42fb1c91e7 in ASN1_STRING_set crypto/asn1/asn1_lib.c:297
openssl#3 0x7f42fb1a6939 in asn1_string_set_int64 crypto/asn1/a_int.c:350
openssl#4 0x7f42fb1a6939 in ASN1_INTEGER_set_int64 crypto/asn1/a_int.c:520
openssl#5 0x7f42fb1dc399 in PKCS8_pkey_set0 crypto/asn1/p8_pkey.c:43
openssl#6 0x7f42fb59def7 in rsa_priv_encode crypto/rsa/rsa_ameth.c:171
openssl#7 0x7f42fb4b6994 in EVP_PKEY2PKCS8 crypto/evp/evp_pkey.c:71
openssl#8 0x7f42fb1d9dfb in i2d_PrivateKey crypto/asn1/i2d_pr.c:23
openssl#9 0x55c2f6f4814f in FuzzerTestOneInput fuzz/asn1.c:345
openssl#10 0x55c2f6f48789 in testfile fuzz/test-corpus.c:182
openssl#11 0x55c2f6f466ef in main fuzz/test-corpus.c:226
openssl#12 0x7f42f9f32082 in __libc_start_main ../csu/libc-start.c:308
openssl#13 0x55c2f6f4689d in _start (.../openssl-111-features/fuzz/asn1-test+0x889d)
=================================================================
==624788==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 46 byte(s) in 1 object(s) allocated from:
#0 0x7f42fc525808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
openssl#1 0x7f42fb1eaa0b in asn1_item_flags_i2d crypto/asn1/tasn_enc.c:64
openssl#2 0x7f42fb1eaa0b in ASN1_item_i2d crypto/asn1/tasn_enc.c:44
openssl#3 0x7f42fb59ddea in rsa_priv_encode crypto/rsa/rsa_ameth.c:163
openssl#4 0x7f42fb4b6994 in EVP_PKEY2PKCS8 crypto/evp/evp_pkey.c:71
openssl#5 0x7f42fb1d9dfb in i2d_PrivateKey crypto/asn1/i2d_pr.c:23
openssl#6 0x55c2f6f4814f in FuzzerTestOneInput fuzz/asn1.c:345
openssl#7 0x55c2f6f48789 in testfile fuzz/test-corpus.c:182
openssl#8 0x55c2f6f466ef in main fuzz/test-corpus.c:226
openssl#9 0x7f42f9f32082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: 46 byte(s) leaked in 1 allocation(s).
bernd-edlinger
added a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 1, 2023
$ ERROR_INJECT=1668583266 ../util/shlib_wrap.sh ./asn1-test ./corpora/asn1/fa3e83c6324c9ae936e6e66b09e155aae02d67ee
#0 0x7f42fc532d4f in __sanitizer_print_stack_trace ../../../../src/libsanitizer/asan/asan_stack.cc:36
openssl#1 0x55c2f6f48bf4 in my_realloc fuzz/test-corpus.c:129
openssl#2 0x7f42fb1c91e7 in ASN1_STRING_set crypto/asn1/asn1_lib.c:297
openssl#3 0x7f42fb1a6939 in asn1_string_set_int64 crypto/asn1/a_int.c:350
openssl#4 0x7f42fb1a6939 in ASN1_INTEGER_set_int64 crypto/asn1/a_int.c:520
openssl#5 0x7f42fb1dc399 in PKCS8_pkey_set0 crypto/asn1/p8_pkey.c:43
openssl#6 0x7f42fb59def7 in rsa_priv_encode crypto/rsa/rsa_ameth.c:171
openssl#7 0x7f42fb4b6994 in EVP_PKEY2PKCS8 crypto/evp/evp_pkey.c:71
openssl#8 0x7f42fb1d9dfb in i2d_PrivateKey crypto/asn1/i2d_pr.c:23
openssl#9 0x55c2f6f4814f in FuzzerTestOneInput fuzz/asn1.c:345
openssl#10 0x55c2f6f48789 in testfile fuzz/test-corpus.c:182
openssl#11 0x55c2f6f466ef in main fuzz/test-corpus.c:226
openssl#12 0x7f42f9f32082 in __libc_start_main ../csu/libc-start.c:308
openssl#13 0x55c2f6f4689d in _start (.../openssl-111-features/fuzz/asn1-test+0x889d)
=================================================================
==624788==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 46 byte(s) in 1 object(s) allocated from:
#0 0x7f42fc525808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
openssl#1 0x7f42fb1eaa0b in asn1_item_flags_i2d crypto/asn1/tasn_enc.c:64
openssl#2 0x7f42fb1eaa0b in ASN1_item_i2d crypto/asn1/tasn_enc.c:44
openssl#3 0x7f42fb59ddea in rsa_priv_encode crypto/rsa/rsa_ameth.c:163
openssl#4 0x7f42fb4b6994 in EVP_PKEY2PKCS8 crypto/evp/evp_pkey.c:71
openssl#5 0x7f42fb1d9dfb in i2d_PrivateKey crypto/asn1/i2d_pr.c:23
openssl#6 0x55c2f6f4814f in FuzzerTestOneInput fuzz/asn1.c:345
openssl#7 0x55c2f6f48789 in testfile fuzz/test-corpus.c:182
openssl#8 0x55c2f6f466ef in main fuzz/test-corpus.c:226
openssl#9 0x7f42f9f32082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: 46 byte(s) leaked in 1 allocation(s).
bernd-edlinger
added a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 8, 2023
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
openssl#1 0x5610a3f396b4 in my_malloc fuzz/test-corpus.c:114
openssl#2 0x7f280a2eb94c in CRYPTO_malloc crypto/mem.c:177
openssl#3 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114
openssl#4 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264
openssl#5 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259
openssl#6 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301
openssl#7 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233
openssl#8 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109
openssl#9 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190
openssl#10 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181
openssl#11 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67)
openssl#12 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#13 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#14 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29
openssl#15 0x5610a3f38783 in main fuzz/test-corpus.c:194
openssl#16 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
openssl#17 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
openssl#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)
openssl#1 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#2 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#3 0x7f280a1c935e in ossl_err_get_state_int crypto/err/err.c:705
openssl#4 0x7f280a1cf1f9 in ERR_new crypto/err/err_blocks.c:20
openssl#5 0x7f280a2eb9ac in CRYPTO_malloc crypto/mem.c:205
openssl#6 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114
openssl#7 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264
openssl#8 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259
openssl#9 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301
openssl#10 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233
openssl#11 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109
openssl#12 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190
openssl#13 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181
openssl#14 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67)
openssl#15 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#16 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#17 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29
openssl#18 0x5610a3f38783 in main fuzz/test-corpus.c:194
openssl#19 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
openssl#20 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
openssl#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
2 tasks
bernd-edlinger
added a commit
to bernd-edlinger/openssl
that referenced
this pull request
Aug 9, 2023
…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
openssl#1 0x5610a3f396b4 in my_malloc fuzz/test-corpus.c:114
openssl#2 0x7f280a2eb94c in CRYPTO_malloc crypto/mem.c:177
openssl#3 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114
openssl#4 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264
openssl#5 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259
openssl#6 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301
openssl#7 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233
openssl#8 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109
openssl#9 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190
openssl#10 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181
openssl#11 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67)
openssl#12 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#13 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#14 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29
openssl#15 0x5610a3f38783 in main fuzz/test-corpus.c:194
openssl#16 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
openssl#17 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
openssl#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)
openssl#1 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#2 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#3 0x7f280a1c935e in ossl_err_get_state_int crypto/err/err.c:705
openssl#4 0x7f280a1cf1f9 in ERR_new crypto/err/err_blocks.c:20
openssl#5 0x7f280a2eb9ac in CRYPTO_malloc crypto/mem.c:205
openssl#6 0x7f280a2dafdb in OPENSSL_LH_insert crypto/lhash/lhash.c:114
openssl#7 0x7f280a1c87fe in err_load_strings crypto/err/err.c:264
openssl#8 0x7f280a1c87fe in err_load_strings crypto/err/err.c:259
openssl#9 0x7f280a1c87fe in ERR_load_strings_const crypto/err/err.c:301
openssl#10 0x7f280a6f513b in ossl_err_load_PROV_strings providers/common/provider_err.c:233
openssl#11 0x7f280a1cf015 in ossl_err_load_crypto_strings crypto/err/err_all.c:109
openssl#12 0x7f280a2e9b8c in ossl_init_load_crypto_strings crypto/init.c:190
openssl#13 0x7f280a2e9b8c in ossl_init_load_crypto_strings_ossl_ crypto/init.c:181
openssl#14 0x7f2808cfbf67 (/lib/x86_64-linux-gnu/libc.so.6+0x99f67)
openssl#15 0x7f280a32301e in CRYPTO_THREAD_run_once crypto/threads_pthread.c:154
openssl#16 0x7f280a2ea1da in OPENSSL_init_crypto crypto/init.c:553
openssl#17 0x5610a3f38e2f in FuzzerInitialize fuzz/asn1parse.c:29
openssl#18 0x5610a3f38783 in main fuzz/test-corpus.c:194
openssl#19 0x7f2808c8bd8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
openssl#20 0x7f2808c8be3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
openssl#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
try to move it to ossl_err_string_int() instead
do the fix in ERR_lib_error_string instead
try err_shelve_state instead
fixup! try err_shelve_state instead
This was referenced Dec 22, 2023
2 tasks
This was referenced Mar 18, 2024
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...ntries, facilitating RFC 5878 (TLS auth extensions)
Removed prior audit proof logic - audit proof support was implemented using the generic TLS extension API
Tests exercising the new supplemental data registration and callback api can be found in ssltest.c.
Implemented changes to s_server and s_client to exercise supplemental data callbacks via the -auth argument, as well as additional flags to exercise supplemental data being sent only during renegotiation.