1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "frameworks_av_media_ndk_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["frameworks_av_media_ndk_license"], 24} 25 26cc_defaults { 27 name: "libmediandk_fuzzer_defaults", 28 shared_libs: [ 29 "libandroid_runtime_lazy", 30 "libbase", 31 "libdatasource", 32 "libmedia", 33 "libmediadrm", 34 "libmedia_omx", 35 "libmedia_jni_utils", 36 "libstagefright", 37 "libstagefright_foundation", 38 "liblog", 39 "libutils", 40 "libcutils", 41 "libnativewindow", 42 "libhidlbase", 43 "libgui", 44 "libui", 45 "libmediandk", 46 ], 47 static_libs: [ 48 "libmediandk_utils", 49 "libnativehelper_lazy", 50 ], 51 header_libs: [ 52 "media_ndk_headers", 53 ], 54 fuzz_config: { 55 cc: [ 56 "android-media-fuzzing-reports@google.com", 57 ], 58 componentid: 155276, 59 hotlists: [ 60 "4593311", 61 ], 62 description: "The fuzzer targets the APIs of libmediandk library", 63 vector: "local_no_privileges_required", 64 service_privilege: "privileged", 65 users: "multi_user", 66 fuzzed_code_usage: "shipped", 67 }, 68} 69 70cc_fuzz { 71 name: "ndk_crypto_fuzzer", 72 srcs: ["ndk_crypto_fuzzer.cpp"], 73 defaults: ["libmediandk_fuzzer_defaults"], 74 fuzz_config: { 75 libfuzzer_options: [ 76 "max_len=10000", 77 ], 78 }, 79} 80 81cc_fuzz { 82 name: "ndk_image_reader_fuzzer", 83 srcs: [ 84 "ndk_image_reader_fuzzer.cpp", 85 ], 86 shared_libs: [ 87 "android.hidl.token@1.0-utils", 88 "android.hardware.graphics.bufferqueue@1.0", 89 ], 90 cflags: [ 91 "-D__ANDROID_VNDK__", 92 ], 93 defaults: ["libmediandk_fuzzer_defaults"], 94} 95 96cc_fuzz { 97 name: "ndk_extractor_fuzzer", 98 srcs: ["ndk_extractor_fuzzer.cpp"], 99 defaults: ["libmediandk_fuzzer_defaults"], 100 shared_libs: ["libbinder_ndk",], 101 corpus: ["corpus/*"], 102} 103 104cc_fuzz { 105 name: "ndk_mediaformat_fuzzer", 106 srcs: ["ndk_mediaformat_fuzzer.cpp"], 107 defaults: ["libmediandk_fuzzer_defaults",], 108} 109 110cc_fuzz { 111 name: "ndk_drm_fuzzer", 112 srcs: ["ndk_drm_fuzzer.cpp"], 113 defaults: ["libmediandk_fuzzer_defaults",], 114} 115 116cc_fuzz { 117 name: "ndk_mediamuxer_fuzzer", 118 srcs: ["ndk_mediamuxer_fuzzer.cpp"], 119 defaults: ["libmediandk_fuzzer_defaults"], 120 shared_libs: ["libbinder_ndk",], 121} 122 123cc_fuzz { 124 name: "ndk_sync_codec_fuzzer", 125 srcs: [ 126 "ndk_sync_codec_fuzzer.cpp", 127 "NdkMediaCodecFuzzerBase.cpp", 128 ], 129 header_libs: ["libnativewindow_headers",], 130 defaults: ["libmediandk_fuzzer_defaults",], 131} 132 133cc_fuzz { 134 name: "ndk_async_codec_fuzzer", 135 srcs: [ 136 "ndk_async_codec_fuzzer.cpp", 137 "NdkMediaCodecFuzzerBase.cpp", 138 ], 139 header_libs: [ 140 "libnativewindow_headers", 141 "libutils_headers", 142 ], 143 defaults: ["libmediandk_fuzzer_defaults",], 144} 145