summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/AndroidKeyStoreMaintenance.java
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2024-02-29 12:03:05 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-14 05:40:29 +0000
commit6fa8602a120947e6b1713345b4fb6251dc9bcbfd (patch)
treeec6282a2d8df300847517c589ede83192912a83c /keystore/java/android/security/AndroidKeyStoreMaintenance.java
parent23265610e3906b160736a49b10bd389485fdb80c (diff)
Verify UID of incoming Zygote connections.
Only the system UID should be allowed to connect to the Zygote. While for generic Zygotes this is also covered by SELinux policy, this is not true for App Zygotes: the preload code running in an app zygote could connect to another app zygote socket, if it had access to its (random) socket address. On the Java layer, simply check the UID when the connection is made. In the native layer, this check was already present, but it actually didn't work in the case where we receive a new incoming connection on the socket, and receive a 'non-fork' command: in that case, we will simply exit the native loop, and let the Java layer handle the command, without any further UID checking. Modified the native logic to drop new connections with a mismatching UID, and to keep serving the existing connection (if it was still there). Bug: 319081336 Test: manual (cherry picked from commit 2ffc7cb220e4220b7e108c4043a3f0f2a85b6508) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4b3ba817073b66ee37da8f1aba93b345309b435) Merged-In: I3f85a17107849e2cd3e82d6ef15c90b9e2f26532 Change-Id: I3f85a17107849e2cd3e82d6ef15c90b9e2f26532
Diffstat (limited to 'keystore/java/android/security/AndroidKeyStoreMaintenance.java')
0 files changed, 0 insertions, 0 deletions