]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3848] Fix fuzzers after security enforcement
authorAndrei Pavel <andrei@isc.org>
Tue, 1 Jul 2025 12:12:38 +0000 (15:12 +0300)
committerAndrei Pavel <andrei@isc.org>
Tue, 1 Jul 2025 12:59:02 +0000 (15:59 +0300)
fuzz/fuzz_http_endpoint_kea_dhcp4.cc
fuzz/fuzz_http_endpoint_kea_dhcp6.cc

index e76f91d21ac6d68b92257f69f93f8be0e6e5bb3e..ac5e8ffad2f303c364543be3b784ceab636e2efa 100644 (file)
@@ -9,7 +9,6 @@
 #include <cassert>
 #include <cstdlib>
 #include <iostream>
-#include <list>
 
 #include <fuzz.h>
 
@@ -37,6 +36,7 @@ using namespace isc::process;
 using namespace isc::http;
 using namespace isc::http::test;
 using namespace isc::util;
+using namespace isc::util::file;
 using namespace std;
 
 namespace {
@@ -105,6 +105,10 @@ LLVMFuzzerInitialize() {
 
     setenv("KEA_DHCP4_FUZZING_ROTATE_PORT", "true", 0);
 
+    // The main focus is on fuzzing the raw HTTP endpoint without the authorization header.
+    // So bypass the enforcement.
+    PathChecker::enableEnforcement(false);
+
     return 0;
 }
 
index 95230f3a4a380b399fd6fd940ae611bf3bedf534..cbccab069b5ed02fedb2d0858c62bad27cea8342 100644 (file)
@@ -9,7 +9,6 @@
 #include <cassert>
 #include <cstdlib>
 #include <iostream>
-#include <list>
 
 #include <fuzz.h>
 
@@ -37,6 +36,7 @@ using namespace isc::process;
 using namespace isc::http;
 using namespace isc::http::test;
 using namespace isc::util;
+using namespace isc::util::file;
 using namespace std;
 
 namespace {
@@ -105,6 +105,10 @@ LLVMFuzzerInitialize() {
 
     setenv("KEA_DHCP6_FUZZING_ROTATE_PORT", "true", 0);
 
+    // The main focus is on fuzzing the raw HTTP endpoint without the authorization header.
+    // So bypass the enforcement.
+    PathChecker::enableEnforcement(false);
+
     return 0;
 }