)]}'
{
  "commit": "49e1a4ba935f726151e2b3954df23ff5ce29dfeb",
  "tree": "bdb0cb1628bb140e095d443f8fd91a52f2ececa7",
  "parents": [
    "78ff07aa12b887fe3bce7647a8f334234b28044f"
  ],
  "author": {
    "name": "Iustin Ventaniuc",
    "email": "iustiniv@google.com",
    "time": "Sun Jun 21 01:22:22 2026 -0700"
  },
  "committer": {
    "name": "Android Build Coastguard Worker",
    "email": "android-build-coastguard-worker@google.com",
    "time": "Mon Jul 13 16:52:02 2026 -0700"
  },
  "message": "Fix boot-loop vulnerability in setPermissionGrantState\n\nA malicious BYOD work-profile DPC could persistently boot-loop the device by passing an out-of-range `grantState` to `setPermissionGrantState()`. This unvalidated value was saved to disk and threw an uncaught `IllegalArgumentException` during subsequent `system_server` boots, requiring a factory reset.\n\nThis commit fixes the issue by:\n1. Adding a `Preconditions.checkArgument` in `DevicePolicyManagerService` to validate the `grantState` when the coexistence flag is enabled, preventing invalid states from being stored.\n2. Wrapping policy re-application calls in `DevicePolicyEngine` with try-catch blocks to ensure that any invalid saved policy state logs a non-fatal error instead of crashing the `system_server` during boot.\n\nTest: Added and ran testSetPermissionGrantState_coexistence_invalidState_throwsException in DevicePolicyManagerTest\n\nBug: 515158597\nFlag: EXEMPT BUGFIX\nThis was autogenerated by MendIt (go/androidmendit)\nCherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:f5cf9571ac81791f9245fd16dfcf42ecd51c793d\nCherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:213028e7bf0b005e9db136abd3c50029ee1fa5a9\nMerged-In: I090604a48f409e5109327217f642730258fb720f\nChange-Id: I090604a48f409e5109327217f642730258fb720f\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "669a999c921ee485b22e351308f830130b79f1b8",
      "old_mode": 33188,
      "old_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java",
      "new_id": "966dcca9762095b954bc193e1d3df2f2385dba77",
      "new_mode": 33188,
      "new_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java"
    },
    {
      "type": "modify",
      "old_id": "002f0be7a71562f62ea7853f6f7f1912b5a79cfd",
      "old_mode": 33188,
      "old_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java",
      "new_id": "bb38ebedb6bf59225df3facdc9ece3426548b50c",
      "new_mode": 33188,
      "new_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java"
    },
    {
      "type": "modify",
      "old_id": "baace5c3def1f6c972ed8aac6fad920cefe20e54",
      "old_mode": 33188,
      "old_path": "services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java",
      "new_id": "fc4b6cbf0ee8ef10e1d0b4757a53e0710b9c7448",
      "new_mode": 33188,
      "new_path": "services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java"
    }
  ]
}
