OSDN Git Service

Prevent OPP from opening files that aren't sent over Bluetooth
authorAjay Panicker <apanicke@google.com>
Tue, 11 Apr 2017 21:45:40 +0000 (14:45 -0700)
committerAjay Panicker <apanicke@google.com>
Sat, 15 Apr 2017 00:42:42 +0000 (00:42 +0000)
commit24bc6f18757cec2d0e71829164c8616e697d442f
tree54469e7600bc1e2e26e42b7ea5cb968a5a482628
parentcd379e8f26d2335799c07144ae8d5965884d0652
Prevent OPP from opening files that aren't sent over Bluetooth

Before this patch an app could send an open intent to
BluetoothOppTransferService using a fake content provider to gain external
read and write access. We fix this by checking the Uri of the file before
opening it to see if it originated from the Bluetooth Share content provider.
We also stop graning write access to apps that we use to view the file.

Bug: 35385327
Test: PoC found in bug
Change-Id: Iad85490a0306b3e70767285393b204be22b11511
src/com/android/bluetooth/opp/BluetoothOppUtility.java