File tree Expand file tree Collapse file tree 4 files changed +21
-1
lines changed
Expand file tree Collapse file tree 4 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ CONFIG_IDF_TARGET_ESP32S2
9494CONFIG_IDF_TARGET_ESP32S3
9595CONFIG_IDF_TARGET_ESP8266
9696CONFIG_IDF_TARGET_ESP8684
97+ CONFIG_KASAN
9798CONFIG_MAIN_TASK_STACK_SIZE
9899CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
99100CONFIG_MBEDTLS_PSA_CRYPTO_C
@@ -803,7 +804,6 @@ WOLFSSL_SILABS_TRNG
803804WOLFSSL_SM4_EBC
804805WOLFSSL_SNIFFER_NO_RECOVERY
805806WOLFSSL_SP_ARM32_UDIV
806- WOLFSSL_SP_DH
807807WOLFSSL_SP_FAST_NCT_EXPTMOD
808808WOLFSSL_SP_INT_SQR_VOLATILE
809809WOLFSSL_STACK_CHECK
Original file line number Diff line number Diff line change @@ -755,6 +755,8 @@ static int updateFipsHash(void)
755755 goto out ;
756756 }
757757
758+ WC_SANITIZE_DISABLE ();
759+
758760 ret = crypto_shash_update (desc , (byte * )(wc_ptr_t )first , (word32 )code_sz );
759761 if (ret ) {
760762 pr_err ("crypto_shash_update failed: err %d\n" , ret );
@@ -781,6 +783,8 @@ static int updateFipsHash(void)
781783 goto out ;
782784 }
783785
786+ WC_SANITIZE_ENABLE ();
787+
784788 ret = crypto_shash_final (desc , hash );
785789 if (ret ) {
786790 pr_err ("crypto_shash_final failed: err %d\n" , ret );
Original file line number Diff line number Diff line change @@ -3673,6 +3673,15 @@ extern void uITRON4_free(void *p) ;
36733673 #endif
36743674 #undef WOLFSSL_MIN_AUTH_TAG_SZ
36753675 #define WOLFSSL_MIN_AUTH_TAG_SZ 4
3676+
3677+ #ifdef CONFIG_KASAN
3678+ #ifndef WC_SANITIZE_DISABLE
3679+ #define WC_SANITIZE_DISABLE () kasan_disable_current()
3680+ #endif
3681+ #ifndef WC_SANITIZE_ENABLE
3682+ #define WC_SANITIZE_ENABLE () kasan_enable_current()
3683+ #endif
3684+ #endif
36763685#endif
36773686
36783687
Original file line number Diff line number Diff line change @@ -1886,6 +1886,13 @@ typedef struct w64wrapper {
18861886 #define RESTORE_VECTOR_REGISTERS () WC_DO_NOTHING
18871887 #endif
18881888
1889+ #ifndef WC_SANITIZE_DISABLE
1890+ #define WC_SANITIZE_DISABLE () WC_DO_NOTHING
1891+ #endif
1892+ #ifndef WC_SANITIZE_ENABLE
1893+ #define WC_SANITIZE_ENABLE () WC_DO_NOTHING
1894+ #endif
1895+
18891896 #if FIPS_VERSION_GE(5,1)
18901897 #define WC_SPKRE_F (x,y ) wolfCrypt_SetPrivateKeyReadEnable_fips((x),(y))
18911898 #define PRIVATE_KEY_LOCK () WC_SPKRE_F(0 ,WC_KEYTYPE_ALL)
You can’t perform that action at this time.
0 commit comments