From: Damien Miller Date: Tue, 17 Sep 2024 01:53:24 +0000 (+1000) Subject: fix bug in recently-added sntrup761 fuzzer X-Git-Tag: V_9_9_P1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fb2b5ad0e748732a27fd8cc16a7ca3c21770806;p=thirdparty%2Fopenssh-portable.git fix bug in recently-added sntrup761 fuzzer key values need to be static to persist across invocations; spotted by the Qualys Security Advisory team. --- 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];