)]}'
{
  "commit": "8cf7d2e9937bc46ceef2a257e62dadd9cbdd7ef1",
  "tree": "98160ab38c9351b17762bec4d7cab1d8388f7218",
  "parents": [
    "f8520e699d1879281623b3b31469c7efa0f860cb"
  ],
  "author": {
    "name": "Kyle Zhang",
    "email": "kelzhan@google.com",
    "time": "Fri Jun 26 19:26:27 2026 +0000"
  },
  "committer": {
    "name": "Android Build Coastguard Worker",
    "email": "android-build-coastguard-worker@google.com",
    "time": "Mon Jul 13 16:35:02 2026 -0700"
  },
  "message": "Fix race conditions in CryptoHal plugin usage\n\nThe previous implementation of `decrypt` and `getKeyHandle` unlocked\n`mLock` while `mPlugin` could be concurrently reset by\n`destroyPlugin()`. This created a window for use-after-free or null\ndereference when the plugin was dispatched. Additionally, the manual\nunlock within the `Mutex::Autolock` scope caused double-unlocking\nundefined behavior upon scope exit.\n\nThis commit scopes the `Autolock` explicitly and takes a strong reference\nof the plugin under the lock. This ensures safe dispatch of the IPC and\navoids duplicate unlocks, mitigating the TOCTOU issue.\n\nBug: 503553199\nTest: build libmediadrm\nFlag: EXEMPT BUGFIX\nCherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:647973577adb51f42d22b94675ec6992f26f581d\nMerged-In: I2e07e603ef641ddf83485a7a0e4c539b1325b91d\nChange-Id: I2e07e603ef641ddf83485a7a0e4c539b1325b91d\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c1fd7975e4c524f209ce2781d39d6e0c80a07056",
      "old_mode": 33188,
      "old_path": "drm/libmediadrm/CryptoHalAidl.cpp",
      "new_id": "130f95fb83bc274d4b692f09300da5a81f5ee9a2",
      "new_mode": 33188,
      "new_path": "drm/libmediadrm/CryptoHalAidl.cpp"
    },
    {
      "type": "modify",
      "old_id": "458a1aea7d402c2bc2316f1784d67f645a095476",
      "old_mode": 33188,
      "old_path": "drm/libmediadrm/CryptoHalHidl.cpp",
      "new_id": "f471167b6808a81922fcf94712ecfc9971788ac8",
      "new_mode": 33188,
      "new_path": "drm/libmediadrm/CryptoHalHidl.cpp"
    }
  ]
}
