roughtime icon indicating copy to clipboard operation
roughtime copied to clipboard

add: FuzzVerifyReply seed

Open pkillarjun opened this issue 1 year ago • 1 comments

Adding seed corpus for FuzzVerifyReply

pkillarjun avatar Dec 11 '24 06:12 pkillarjun

How did i get it?

diff --git a/protocol/protocol_test.go b/protocol/protocol_test.go
index eda8453..2b4aa2c 100644
--- a/protocol/protocol_test.go
+++ b/protocol/protocol_test.go
@@ -207,6 +207,10 @@ func TestRunTestVectors(t *testing.T) {
                                if !bytes.Equal(replies[i], expectedReply) {
                                        t.Error("unexpected reply")
                                }
+                               // Print out the bytes before verification
+                               t.Logf("replyBytes=%x", replies[i])
+                               t.Logf("publicKey=%x", rootPublicKey)
+                               t.Logf("nonce=%x", requests[i].Nonce)
 
                                // Make sure the responses verify properly.
                                _, _, err = VerifyReply([]Version{responseVer}, replies[i], rootPublicKey, requests[i].Nonce)

Why is this important?

For these FP(false positive) crash, I guess.

https://oss-fuzz.com/testcase-detail/6652266200760320 https://oss-fuzz.com/testcase-detail/5822721788805120

pkillarjun avatar Dec 11 '24 06:12 pkillarjun