summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Yuri Lin <yurilin@google.com> 2022-08-29 17:40:14 -0400
committer Yuri Lin <yurilin@google.com> 2022-09-01 18:48:34 +0000
commitd4b5212eb6d6f9ecb967d8403d1d8dd63cf69afb (patch)
tree3b025574ab79202c95e06351d55c38bb0f8cec32 /libs/androidfw/StringPool.cpp
parent91e0c35911498f2546357bb8786e291a3263e1d6 (diff)
Trim any long string inputs that come in to AutomaticZenRule
This change both prevents any rules from being unable to be written to disk and also avoids risk of running out of memory while handling all the zen rules. Bug: 242703460 Bug: 242703505 Bug: 242703780 Bug: 242704043 Bug: 243794204 Test: cts AutomaticZenRuleTest; atest android.app.AutomaticZenRuleTest; manually confirmed each exploit example either saves the rule successfully with a truncated string (in the case of name & conditionId) or may fail to save the rule at all (if the owner/configactivity is invalid). Additionally ran the memory-exhausting PoC without device crashes. Change-Id: I110172a43f28528dd274b3b346eb29c3796ff2c6 Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6 (cherry picked from commit de172ba0d434c940be9e2aad8685719731ab7da2)
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions