)]}'
{
  "commit": "d083d6987a0f7b82a271f9010b977c7a9367efdc",
  "tree": "8a049baa02071083a73f7f9242a7c82b13482c68",
  "parents": [
    "13f85a97540c7738af725e54cb0208fc381434c5"
  ],
  "author": {
    "name": "Daniel Bourgeois",
    "email": "dcbourgeois@google.com",
    "time": "Fri Sep 25 09:31:10 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri Sep 25 09:33:51 2026 -0700"
  },
  "message": "Prevent integer overflow in safepower_agent ValidateBootCountCondition\n\n`BootState::boot_counter` is a `uint32` proto field, while `ValidateBootCountCondition` assigns `boot_counter` to a signed `int` and adds `boot` / `max_boots` without bounds checking, which could cause signed integer overflow (Undefined Behavior) near `INT_MAX` or wrap around modulo 2^32 near `UINT32_MAX`.\n\nUpdate `ValidateBootCountCondition` to bound both `max_boots` (`[1, kMaxBootCount]`) and `boot_state-\u003eboot_counter()` (`\u003c\u003d kMaxBootCount`, where `kMaxBootCount \u003d 1\u0027000\u0027000\u0027000` represents ~31 years of 1-second reboots) so `current_boot_count + max_boots` always fits safely within a standard signed `int`.\n\nPiperOrigin-RevId: 988326544\nChange-Id: I8f88c275c8c9f6598a14f6adc83eec25fa0c3ca0\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "df7e2772ee3ba3ccd95aacc69d91a9b41beabd5a",
      "old_mode": 33188,
      "old_path": "action_validation.cc",
      "new_id": "c1c74dfc8e06387d62bf5ad0b1ad746bf97a10c1",
      "new_mode": 33188,
      "new_path": "action_validation.cc"
    },
    {
      "type": "modify",
      "old_id": "df2e5c578fe3f1412b8f5e55faaed564836f4300",
      "old_mode": 33188,
      "old_path": "action_validation.h",
      "new_id": "5aceb5a2a47ce367b8c9448f647b4dc62ce8a7e9",
      "new_mode": 33188,
      "new_path": "action_validation.h"
    },
    {
      "type": "modify",
      "old_id": "a20b8bd9278e8b5e2ee28ff2482db90cbb473128",
      "old_mode": 33188,
      "old_path": "piper_cl.txt",
      "new_id": "edcc86e29c7cf5067c26515e97615bade8f4d1c4",
      "new_mode": 33188,
      "new_path": "piper_cl.txt"
    }
  ]
}
