-
Notifications
You must be signed in to change notification settings - Fork 24
Description
ProcessManager.exec is modified at https://github.com/OpenPDroid/OpenPDroidPatches/blob/4.2.1/openpdroid_4.2.1_libcore.patch#L311
The current modifications are possibly insecure. If taintedCommand[0] == null, a crash occurs. The checks are performed on an array that can still be modified by the caller (timing attacks?)
What is the rationale of changing the command from bash to su if the command is denied? Wouldn't it be better to throw an exception, return null or set the command to false if you want to have a no-op command?
Anyway, the taintedCommand != null lines can be dropped and to increase security, it should be put after the sanity checks and clone (just before setting up file descriptors).
(general question, would you like patches against the source tree or patches for the patches? Incremental or full?)