Reject external connect: requests.
authorShaju Mathew <shaju@google.com>
Sat, 25 Jun 2022 14:57:31 +0000 (14:57 +0000)
committerRoger Shimizu <rosh@debian.org>
Tue, 31 Jan 2023 07:58:29 +0000 (07:58 +0000)
commit254440369e2c485e166cc1d17f0a542fafdbff65
treea0134662ea79334b357d89c3bb98ca9e7a4ef7c9
parent9c436599b4fb4d05e402c346df737535e1e6bfa8
Reject external connect: requests.

Steps:
  1. Track forward:reverse config in a data-structure.
  2. connect_to_remote() examines each socket transport and updates
    this data-structure.
  3. handle_packet() takes appropriate action
    (abort) for an unknown connect: request originating from the device.

Bug:205286508

Test: treehugger

Signed-off-by: jmgao <jmgao@fb.com>
Change-Id: I0ec7d6f8e60afc2ee5d1be2b63bf90ca99443a52

Gbp-Pq: Topic cve
Gbp-Pq: Name CVE-2022-3168.patch
system/core/adb/adb.cpp
system/core/adb/sockets.cpp
system/core/adb/transport.cpp
system/core/adb/transport.h