diff options
author | gdemarcsek <gyorgy.demarcsek@protonmail.ch> | 2023-03-08 00:21:24 +0100 |
---|---|---|
committer | Norbert Schneider <mail@bertschneider.de> | 2023-06-13 08:57:04 +0200 |
commit | 925c1ccbe5b36cbd398478b5036a8069e05e944e (patch) | |
tree | 45d1986469778976e40974a40882231a22d2c33e | |
parent | 166067be027e6e4bd8d01b07e54eafdee759632e (diff) | |
download | jazzer-api-925c1ccbe5b36cbd398478b5036a8069e05e944e.tar.gz |
remove hook that is no longer needed (however likely makes the Commons Text example somewhat slower)
-rw-r--r-- | examples/BUILD.bazel | 12 | ||||
-rw-r--r-- | examples/src/main/java/com/example/CommonsTextFuzzerHooks.java | 28 |
2 files changed, 0 insertions, 40 deletions
diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 012a76db..b9818dd6 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -179,17 +179,6 @@ java_fuzz_target_test( ], ) -java_binary( - name = "CommonsTextFuzzerHooks", - srcs = ["src/main/java/com/example/CommonsTextFuzzerHooks.java"], - create_executable = False, - deploy_manifest_lines = ["Jazzer-Hook-Classes: com.example.CommonsTextFuzzerHooks"], - deps = [ - "//src/main/java/com/code_intelligence/jazzer/api:hooks", - #"@maven//:org_apache_commons_commons_text" - ], -) - # WARNING: This fuzz target uses a vulnerable version of Apache Commons Text, which could result in the execution # of arbitrary code during fuzzing if executed with an older JDK. Use at your own risk. java_fuzz_target_test( @@ -208,7 +197,6 @@ java_fuzz_target_test( ], verify_crash_reproducer = False, size = "enormous", - hook_jar = "CommonsTextFuzzerHooks_deploy.jar", ) java_fuzz_target_test( diff --git a/examples/src/main/java/com/example/CommonsTextFuzzerHooks.java b/examples/src/main/java/com/example/CommonsTextFuzzerHooks.java deleted file mode 100644 index 564807dc..00000000 --- a/examples/src/main/java/com/example/CommonsTextFuzzerHooks.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022 Code Intelligence GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.example; - -import com.code_intelligence.jazzer.api.HookType; -import com.code_intelligence.jazzer.api.MethodHook; -import java.lang.invoke.MethodHandle; - -public class CommonsTextFuzzerHooks { - @MethodHook(type = HookType.REPLACE, targetClassName = "org.apache.commons.text.lookup.StringLookupFactory", targetMethod = "constantStringLookup") - public static Object hookConstStringLookup(MethodHandle handle, Object thisObject, Object[] args, int hookId) { - // Remove the ConstantStringLookup singleton to avoid the ReflectiveCall - // sanitizer for this example - return null; - } -} |