This document outlines security vulnerabilities and proposed mitigations within the iOS DataMigration.framework and its associated XPC workers. The core issue is that the migration system uses a highly privileged plugin host process that runs various dynamic plugins. Because entitlements are tied to the process rather than the specific plugin, a vulnerability in a single plugin (e.g., a contact migration plugin) can allow an attacker to pivot to unrelated high-privilege systems (e.g., keychain or profiles).
Key security weaknesses identified include:
- Over-entitled processes: The plugin host holds a strict superset of all entitlements needed by its plugins.
- Lack of plugin-specific entitlements: There is no mechanism for a dynamically loaded shared object to declare its own specific entitlements (like
com.apple.datamigration.plugin). - Atomic
dlopen risks: The current dlopen mechanism does not allow for a 'preflight' state where a module is mapped as Read-only (R) and inspected for authenticity (via Trust Cache/CDHash) before being granted Execute (X) permissions. execve descriptor persistence: Entitlements checked for an initial process might persist through an execve call, allowing a new binary to inherit open, entitled connections.- MobileDevice Framework downgrades: The ability to modify
MobileDevice components on the Data partition of macOS allows for downgrading system frameworks without being an entitled process.