summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Austin Borger <borgera@google.com> 2023-02-09 16:00:02 -0800
committer Austin Borger <borgera@google.com> 2023-02-20 17:02:45 -0800
commit922e52bc3d2a6576cc3e45268dfc3ecd3550f45f (patch)
treebcfed870c41e7c24db75f9f1974699b5e013f14f /libs/androidfw/StringPool.cpp
parentd2b13f41420379e489eedcfe6983f726f75d3b10 (diff)
Fix vulnerability in AttributionSource due to incorrect Binder call
AttributionSource uses Binder.getCallingUid to verify the UID of the caller from another process. However, getCallingUid does not always behave as expected. If the AttributionSource is unparceled outside a transaction thread, which is quite possible, getCallingUid will return the UID of the current process instead. If this is a system process, the UID check gets bypassed entirely, meaning any uid can be provided. This patch fixes the vulnerability by enforcing that the AttributionSource be unparceled in a transaction only. If it is not, a SecurityException will be thrown. Bug: 267231571 Test: Smoke test on cuttlefish. Test: v2/android-virtual-infra/test_mapping/presubmit-avd Change-Id: Ic301a8518b8e57e1c9a2c9f2f845e51dca145257
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions