From 5e74eefd8833fefa3e13e20ffa7cecf777af1de4 Mon Sep 17 00:00:00 2001 From: Johanna Amann Date: Tue, 29 Jul 2025 18:28:27 +0100 Subject: [PATCH] DNS-fuzzer: raise new_connection event The conn protocol scripts now assume that new_connection is run before connection_state_remove. Update the DNS analyzer to raise the new_connection event. --- src/fuzzers/dns-fuzzer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fuzzers/dns-fuzzer.cc b/src/fuzzers/dns-fuzzer.cc index cd0b9f657c..ef0e3decf9 100644 --- a/src/fuzzers/dns-fuzzer.cc +++ b/src/fuzzers/dns-fuzzer.cc @@ -48,6 +48,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { auto conn = add_connection(); auto a = add_analyzer(conn); + // The conn protocol scripts assume that new_connection is run before connection_state_remove. + if ( new_connection ) + conn->Event(new_connection, nullptr); + try { a->DeliverPacket(size, data, true, -1, nullptr, size); } catch ( const binpac::Exception& e ) {