• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/******************************************************************************
2 *
3 * Copyright (C) 2021 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20
21package {
22    // See: http://go/android-license-faq
23    // A large-scale-change added 'default_applicable_licenses' to import
24    // all of the 'license_kinds' from "frameworks_av_services_camera_libcameraservice_license"
25    // to get the below license kinds:
26    //   SPDX-license-identifier-Apache-2.0
27    default_applicable_licenses: [
28        "frameworks_av_services_camera_libcameraservice_license",
29    ],
30}
31
32cc_defaults {
33    name: "camera_service_fuzzer_defaults",
34    header_libs: [
35        "libaudioflinger_headers",
36        "libaudiohal_headers",
37        "libaudioutils_headers",
38        "libbinder_headers",
39        "libmedia_headers",
40        "libmediautils_headers",
41        "mediautils_headers",
42    ],
43    shared_libs: [
44        "android.hardware.camera.common@1.0",
45        "android.hardware.camera.device@1.0",
46        "android.hardware.camera.device@3.2",
47        "android.hardware.camera.device@3.3",
48        "android.hardware.camera.device@3.4",
49        "android.hardware.camera.device@3.5",
50        "android.hardware.camera.device@3.6",
51        "android.hardware.camera.device@3.7",
52        "android.hardware.camera.provider-V3-ndk",
53        "android.hardware.camera.provider@2.4",
54        "android.hardware.camera.provider@2.5",
55        "android.hardware.camera.provider@2.6",
56        "android.hardware.camera.provider@2.7",
57        "camera_platform_flags_c_lib",
58        "framework-permission-aidl-cpp",
59        "libactivitymanager_aidl",
60        "libaudioclient",
61        "libaudioflinger",
62        "libaudiohal",
63        "libaudioprocessing",
64        "libbase",
65        "libbinder",
66        "libcamera_client",
67        "libcameraservice",
68        "libcutils",
69        "libgui",
70        "liblog",
71        "libmediaplayerservice",
72        "libmediautils",
73        "libnbaio",
74        "libnblog",
75        "libpermission",
76        "libpowermanager",
77        "libsensorprivacy",
78        "libui",
79        "libutils",
80        "libvibrator",
81        "packagemanager_aidl-cpp",
82    ],
83    static_libs: [
84        "libaudiomockhal",
85        "libbinder_random_parcel",
86    ],
87    fuzz_config: {
88        cc: [
89            "android-camera-fwk-eng@google.com",
90        ],
91        componentid: 41727,
92        libfuzzer_options: [
93            //based on b/187360866
94            "timeout=770",
95        ],
96        hotlists: [
97            "4593311",
98        ],
99        description: "The fuzzer targets the APIs of libcameraservice",
100        vector: "local_no_privileges_required",
101        service_privilege: "privileged",
102        users: "multi_user",
103        fuzzed_code_usage: "shipped",
104    },
105}
106
107cc_fuzz {
108    name: "camera_service_fuzzer",
109    srcs: [
110        "camera_service_fuzzer.cpp",
111    ],
112    static_libs: [
113        "libfakeservicemanager",
114    ],
115    defaults: [
116        "camera_service_fuzzer_defaults",
117        "latest_android_hardware_audio_core_ndk_shared",
118        "latest_android_hardware_audio_core_sounddose_ndk_shared",
119        "latest_android_hardware_audio_effect_ndk_shared",
120        "libaudioflinger_dependencies",
121    ],
122}
123
124cc_fuzz {
125    name: "camera_service_aidl_fuzzer",
126    srcs: [
127        "camera_service_aidl_fuzzer.cpp",
128    ],
129    defaults: [
130        "camera_service_fuzzer_defaults",
131        "fuzzer_disable_leaks",
132        "service_fuzzer_defaults",
133    ],
134    fuzz_config: {
135        triage_assignee: "waghpawan@google.com",
136    },
137}
138