OSDN Git Service

Adds additional sanitization for Zygote command arguments.
authorChris Wailes <chriswailes@google.com>
Fri, 19 Apr 2019 01:25:57 +0000 (18:25 -0700)
committerChristian Wailes <chriswailes@google.com>
Thu, 25 Apr 2019 21:03:09 +0000 (21:03 +0000)
commitaee02f6ffe859852afec3d02287647c658a40967
tree7d159295fbe5dcd1328d7877cfafdef4019e4c90
parent6ee42f473c1fe99c3901b61032ead7a8f2d1f4c5
Adds additional sanitization for Zygote command arguments.

Previously we were only insuring that the arguments provided to the
Zygote didn't contain any newlines.  This adds additional checks for
carriage returns and standalone integer arguments to protect against
malicious argument and packet injection respectively.

Bug: 130164289
Test: m & flash & boot & check logs
Change-Id: I4055c50d52db0047c02c11096710fd07b429660c
Merged-In: I4055c50d52db0047c02c11096710fd07b429660c
(cherry picked from commit c99198249f8bb79487d4f9f0f45b5b2fefaba41a)
core/java/android/os/ZygoteProcess.java