diff options
| author | 2023-12-11 18:50:46 +0000 | |
|---|---|---|
| committer | 2023-12-13 21:48:18 +0000 | |
| commit | 30b2cd8091e0600743e6d0442c7a94127887df82 (patch) | |
| tree | 4479bc5dbb53b4770add2c5044ac1c387754e741 /libs/androidfw/misc.cpp | |
| parent | 9bbbca96971cf7f351a4cc13e3f16f132d6d8493 (diff) | |
Throw exception for negative UIDs/GIDs
UIDs and GIDs are unsigned on linux. Badly behaved callers are
occasionally passing negative integers for UIDs through JNI to uid_t
which is unsigned. Prevent this by throwing a JNI exception.
12-08 23:15:34.542 1000 3354 3388 I ActivityManager: Force stopping com.android.cts.install.lib.testapp.A appid=10109 user=-1: deletePackageX
12-08 23:15:34.543 1000 3354 3388 E libprocessgroup: No such cgroup attribute: /sys/fs/cgroup/uid_4294877405/cgroup.freeze
12-08 23:15:34.543 1000 3354 3388 W libprocessgroup: Failed to apply Frozen process profile: No such file or directory
Test: 12-11 18:43:23.145 3432 3466 I ActivityManager: Force stopping com.android.cts.install.lib.testapp.A appid=10109 user=-1: deletePackageX
Test: 12-11 18:43:23.146 3432 3466 E ActivityManager: Unable to freeze cgroup uid: -89891: java.lang.IllegalArgumentException: uid is negative: -89891
Test: 12-11 18:43:23.147 3432 3466 E ActivityManager: Unable to unfreeze cgroup uid: -89891: java.lang.IllegalArgumentException: uid is negative: -89891
Bug: 316198981
Change-Id: I24cb1e65e502ef6e09226538efe6ed54c8db7cdd
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions