Example #1
0
def get_config():
    """Get arguments for a given fuzz target."""
    device_serial = environment.get_value('ANDROID_SERIAL')
    build_dir = environment.get_value('BUILD_DIR')
    temp_dir = fuzzer_utils.get_temp_dir()

    binary_path = os.path.join(build_dir, 'syzkaller')
    json_config_path = os.path.join(temp_dir, 'config.json')
    default_vmlinux_path = os.path.join('/tmp', device_serial, 'vmlinux')
    vmlinux_path = environment.get_value('VMLINUX_PATH', default_vmlinux_path)

    syzhub_address = environment.get_value('SYZHUB_ADDRESS')
    syzhub_client = environment.get_value('SYZHUB_CLIENT')
    syzhub_key = environment.get_value('SYZHUB_KEY')

    config.generate(serial=device_serial,
                    work_dir_path=get_work_dir(),
                    binary_path=binary_path,
                    vmlinux_path=vmlinux_path,
                    config_path=json_config_path,
                    kcov=True,
                    reproduce=False,
                    syzhub_address=syzhub_address,
                    syzhub_client=syzhub_client,
                    syzhub_key=syzhub_key)
    return ['-config', json_config_path]
Example #2
0
def get_arguments(unused_fuzzer_path):
    """Get arguments for a given fuzz target."""
    build_dir = environment.get_value('BUILD_DIR')
    device_serial = environment.get_value('ANDROID_SERIAL')
    json_config_path = os.path.join('/tmp', device_serial, 'config.json')
    config.generate(serial=device_serial,
                    work_dir_path=constants.SYZKALLER_WORK_FOLDER,
                    binary_path=os.path.join(build_dir, 'syzkaller'),
                    vmlinux_path=constants.VMLINUX_FOLDER,
                    config_path=json_config_path,
                    kcov=True,
                    reproduce=False)
    return ['--config', json_config_path]