)]}'
{
  "commit": "f4e7001b21fb26b57d06c7e487de95fd6c63fe6e",
  "tree": "45e3050f9a289f5b078fcb3a2481e58684d8c779",
  "parents": [
    "e8ef27e17d89f80884421c4374048b7d9daaad64"
  ],
  "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 18:02:44 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:4abace2e8718041eb31f75650e2543fa57e0eb60\nMerged-In: I090604a48f409e5109327217f642730258fb720f\nChange-Id: I090604a48f409e5109327217f642730258fb720f\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e3b9fdb16d596c5655334ad248649021bbbedc2b",
      "old_mode": 33188,
      "old_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java",
      "new_id": "dc5293458980dd5a2a57c01e91a3522fd852e4d5",
      "new_mode": 33188,
      "new_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java"
    },
    {
      "type": "modify",
      "old_id": "725a21f46f2387bc122e288245e1b386f22325f0",
      "old_mode": 33188,
      "old_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java",
      "new_id": "8583600095558bc908521f81a130ba7c86493a3c",
      "new_mode": 33188,
      "new_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java"
    },
    {
      "type": "modify",
      "old_id": "e5a4af590ffab5591e000f3303a82ab3d4762387",
      "old_mode": 33188,
      "old_path": "services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java",
      "new_id": "3b75026e20d91a70cea0c5298efc9723a7eeb4b1",
      "new_mode": 33188,
      "new_path": "services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java"
    }
  ]
}
