)]}'
{
  "commit": "69809a4c8421cabd2363df22e6f664412996a3f4",
  "tree": "080b0ce2d1ac9cfb95064264940061b229710df2",
  "parents": [
    "2cb35d43651d5c8caafd31eba5684c0785c7a289"
  ],
  "author": {
    "name": "Duy Truong",
    "email": "duytruong@google.com",
    "time": "Thu Jun 18 05:45:27 2026 +0000"
  },
  "committer": {
    "name": "Android Build Coastguard Worker",
    "email": "android-build-coastguard-worker@google.com",
    "time": "Fri Sep 04 10:41:43 2026 -0700"
  },
  "message": "Fix OOB read and UAF in InputDispatcher::flushSensor\n\nIn `InputDispatcher::flushSensor()`, erasing an element from\n`mInboundQueue` returns an iterator that was unconditionally incremented\nby the loop. If the erased element was the last one, the increment\nadvanced the iterator past `end()`, resulting in an out-of-bounds read\nand use-after-free when the next iteration dereferenced the invalid\niterator.\n\nThis patch fixes the issue by updating the loop to only increment the\niterator when an element is not erased. Additionally, the function now\nproperly inspects the `SensorEntry` fields to ensure only inbound sensor\nevents matching the specified `deviceId` and `sensorType` parameters are\nerased, whereas previously it was unconditionally erasing all sensor\nevents.\n\nThis change also includes additional fix in tests to make them\ndeterministic by freeze dispatching before the events are enqueued, then\nadd the events, and then call flush.\n\nTest: atest inputflinger_tests --host Bug: 514737201 Flag: EXEMPT BUGFIX\nLow-Coverage-Reason: coverage infra is broken\n\nCherrypick-From:\nhttps://googleplex-android-review.googlesource.com/q/commit:321a057cca83b8a7843b394b644ed7ab9a24cefd\n\nCherrypicked by Aesir (go/aesir-backport-automation)\nCherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:99fb83e5c9e381c1a98ad51dcd2b8d7d0dbffd7c\nMerged-In: I2b5e1ffd224864e20b0f86dce0aea9bf87a7dd8a\nChange-Id: I2b5e1ffd224864e20b0f86dce0aea9bf87a7dd8a\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f4f15deacfff389edb460dc3ae3c27564b35a74f",
      "old_mode": 33188,
      "old_path": "services/inputflinger/dispatcher/InputDispatcher.cpp",
      "new_id": "6af55eda415c17c1c97dcf7c186a1b9e12f6c84a",
      "new_mode": 33188,
      "new_path": "services/inputflinger/dispatcher/InputDispatcher.cpp"
    },
    {
      "type": "modify",
      "old_id": "6ff420d95104589407a2afc31030dee740374ef8",
      "old_mode": 33188,
      "old_path": "services/inputflinger/tests/InputDispatcher_test.cpp",
      "new_id": "db716fc8c218a65076bc286b7b3668d2f7b332e0",
      "new_mode": 33188,
      "new_path": "services/inputflinger/tests/InputDispatcher_test.cpp"
    }
  ]
}
