summaryrefslogtreecommitdiff
path: root/tools/validatekeymaps/Main.cpp
diff options
context:
space:
mode:
author Tetiana Meronyk <tetianameronyk@google.com> 2023-08-24 16:27:30 +0000
committer Tetiana Meronyk <tetianameronyk@google.com> 2023-10-06 12:34:31 +0000
commit59042a32c7e192d160c295ecb6477a09bb5da0bb (patch)
treee0fc25e9edf8143752841f283e690ae4dd611d9f /tools/validatekeymaps/Main.cpp
parent5ca3ba7c7ce93c609b779952ad38f2400244d260 (diff)
Truncate user data to a limit of 500 characters
Fix vulnerability that allows creating users with no restrictions. This is done by creating an intent to create a user and putting extras that are too long to be serialized. It causes IOException and the restrictions are not written in the file. By truncating the string values when writing them to the file, we ensure that the exception does not happen and it can be recorded correctly. Bug: 293602317 Test: install app provided in the bug, open app and click add. Check logcat to see there is no more IOException. Reboot the device by either opening User details page or running adb shell dumpsys user | grep -A12 heen and see that the restrictions are in place. Change-Id: I633dc10974a64ef2abd07e67ff2d209847129989 Merged-In: I633dc10974a64ef2abd07e67ff2d209847129989
Diffstat (limited to 'tools/validatekeymaps/Main.cpp')
0 files changed, 0 insertions, 0 deletions