Exploit databaseDownload repository ZIP
GH-1cc0458bd4e24354f1be177e7e1c1854
shaikusaf/system_bt_aosp10_r33_cve-2022-20229
Sources for CVE-2022-20229
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files41
shaikusaf/system_bt_aosp10_r33_cve-2022-20229Revision 148a2a48d97d
- ↑..Parent directory
- client/
- common/
- doc/
- example/
- hal/
- ipc/
- test/
- Android.bp
- BUILD.gn
- a2dp_sink.cc
- a2dp_sink.h
- a2dp_source.cc
- a2dp_source.h
- adapter.cc
- adapter.h
- avrcp_control.cc
- avrcp_control.h
- avrcp_target.cc
- avrcp_target.h
- bluetooth_instance.h
- bluetoothtbd.rc
- daemon.cc
- daemon.h
- gatt_client.cc
- gatt_client.h
- gatt_server.cc
- gatt_server.h
- gatt_server_old.cc
- gatt_server_old.h
- logging_helpers.cc
- logging_helpers.h
- low_energy_advertiser.cc
- low_energy_advertiser.h
- low_energy_client.cc
- low_energy_client.h
- low_energy_scanner.cc
- low_energy_scanner.h
- main.cc
- settings.cc
- settings.h
- switches.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
service/gatt_client.h
Text · 2,721 bytes//
// Copyright 2015 Google, Inc.
//
// 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.
//
#pragma once
#include <mutex>
#include <unordered_map>
#include <base/macros.h>
#include <bluetooth/uuid.h>
#include "service/bluetooth_instance.h"
#include "service/hal/bluetooth_gatt_interface.h"
namespace bluetooth {
// A GattClient instance represents an application's handle to perform GATT
// client-role operations. Instances cannot be created directly and should be
// obtained through the factory.
class GattClient : public BluetoothInstance {
public:
~GattClient() override;
// BluetoothClientInstace overrides:
const Uuid& GetAppIdentifier() const override;
int GetInstanceId() const override;
private:
friend class GattClientFactory;
// Constructor shouldn't be called directly as instances are meant to be
// obtained from the factory.
GattClient(const Uuid& uuid, int client_id);
// See getters above for documentation.
Uuid app_identifier_;
int client_id_;
DISALLOW_COPY_AND_ASSIGN(GattClient);
};
// GattClientFactory is used to register and obtain a per-application GattClient
// instance. Users should call RegisterClient to obtain their own unique
// GattClient instance that has been registered with the Bluetooth stack.
class GattClientFactory : public BluetoothInstanceFactory,
private hal::BluetoothGattInterface::ClientObserver {
public:
// Don't construct/destruct directly except in tests. Instead, obtain a handle
// from an Adapter instance.
GattClientFactory();
~GattClientFactory() override;
// BluetoothInstanceFactory override:
bool RegisterInstance(const Uuid& uuid,
const RegisterCallback& callback) override;
private:
// hal::BluetoothGattInterface::ClientObserver override:
void RegisterClientCallback(hal::BluetoothGattInterface* gatt_iface,
int status, int client_id,
const Uuid& app_uuid) override;
// Map of pending calls to register.
std::mutex pending_calls_lock_;
std::unordered_map<Uuid, RegisterCallback> pending_calls_;
DISALLOW_COPY_AND_ASSIGN(GattClientFactory);
};
} // namespace bluetooth