Commit Graph

2 Commits

Author SHA1 Message Date
Jeff Sharkey
1561df4a9b Detector for Binder.clearCallingIdentity() bugs.
Binder maintains thread-local identity information about any remote
caller, which can be temporarily cleared while performing operations
that need to be handled as the current process. However, it's
important to restore the original remote calling identity after
carefully scoping this work inside a try/finally block, to avoid
obscure security vulnerabilities.

Bug: 155703208
Test: atest error_prone_android_framework_test
Change-Id: I568771a50af27637e4984950dcada2248ce16afe
2020-10-05 16:03:10 -06:00
Jeff Sharkey
439b861677 Add checker for PID/UID/user ID arguments.
Many system internals pass around PID, UID and user ID arguments as a
single weakly-typed "int" value, which developers can accidentally
cross in method argument lists, resulting in obscure bugs.

Bug: 155703208
Test: atest error_prone_android_framework_test
Change-Id: I5e4d9b5a533071f94d82dff17faff5d52ae54564
2020-06-24 14:52:47 -06:00