From 5fb2b5ad0e748732a27fd8cc16a7ca3c21770806 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 17 Sep 2024 11:53:24 +1000 Subject: fix bug in recently-added sntrup761 fuzzer key values need to be static to persist across invocations; spotted by the Qualys Security Advisory team. --- regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc b/regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc index e508cb151..9aecae0ad 100644 --- a/regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc +++ b/regress/misc/fuzz-harness/sntrup761_dec_fuzz.cc @@ -50,8 +50,8 @@ void privkeys(unsigned char *zero_sk, unsigned char *rnd_sk) int LLVMFuzzerTestOneInput(const uint8_t* input, size_t len) { static bool once; - unsigned char zero_sk[crypto_kem_sntrup761_SECRETKEYBYTES]; - unsigned char rnd_sk[crypto_kem_sntrup761_SECRETKEYBYTES]; + static unsigned char zero_sk[crypto_kem_sntrup761_SECRETKEYBYTES]; + static unsigned char rnd_sk[crypto_kem_sntrup761_SECRETKEYBYTES]; unsigned char ciphertext[crypto_kem_sntrup761_CIPHERTEXTBYTES]; unsigned char secret[crypto_kem_sntrup761_BYTES]; -- cgit v1.2.3