Jack Lau
e28991e9c8
fix(update): decide ancestry link by link so an unreadable /proc/1 cannot hide the orchestrator
...
`_is_ancestor_pid` asked psutil for the whole parent chain at once:
any(parent.pid == pid for parent in psutil.Process().parents())
`Process.parents()` is eager: it walks all the way to the lowest pid
*before* returning a list, so the generator expression cannot
short-circuit when it reaches the matching ancestor. Its per-link
`parent()` tolerates only `NoSuchProcess`, so any process we may not
inspect anywhere above us raises `AccessDenied` out of the whole call,
and the `except Exception` guard discards every ancestor already found,
including the orchestrator one link down.
Under firejail with `ptrace_scope=1`, and in hardened containers,
`/proc/1` is exactly that unreadable process. The hand-off child then
failed to recognize its own parent's fresh marker, `UpdateLock.acquire`
treated a live orchestrator as a foreign concurrent updater, and the
in-app update exited 2 ("Another Hermes update is already running",
naming the hand-off script's own pid) on every attempt, indefinitely.
Walk the chain one link at a time and test each ancestor as it is
discovered, so a failure above a match can no longer erase it. A
failure encountered before any match still returns False, keeping the
conservative refusal for genuinely unprovable ancestry. The walk is
bounded by `_MAX_ANCESTRY_DEPTH` and skips a repeated pid so an
unexpected chain cannot spin.
Fixes #87514
2026-09-29 20:58:59 -05:00
..
2026-09-28 10:21:41 -07:00
2026-09-29 18:49:58 -05:00
2026-09-29 15:58:55 +05:30
2026-09-29 18:48:37 -05:00
2026-09-29 20:57:23 -05:00
2026-09-24 14:47:06 -04:00
2026-09-29 20:57:17 -05:00
2026-09-18 20:02:36 -04:00
2026-09-29 14:36:55 +05:30
2026-09-29 16:47:48 +05:30
2026-09-25 17:57:38 -05:00
2026-09-23 11:41:01 -04:00
2026-09-29 18:49:58 -05:00
2026-09-27 02:55:39 -07:00
2026-09-21 00:58:39 -04:00
2026-09-19 01:38:09 -04:00
2026-09-28 10:21:41 -07:00
2026-09-22 09:55:47 -04:00
2026-09-29 20:24:19 -04:00
2026-09-29 07:44:13 +00:00
2026-09-19 12:11:58 -07:00
2026-09-28 03:37:09 -07:00
2026-09-21 19:08:19 -04:00
2026-09-23 11:41:01 -04:00
2026-09-24 18:06:48 +05:30
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 18:47:44 -05:00
2026-09-27 18:37:01 +05:30
2026-09-20 18:21:34 -07:00
2026-09-20 18:29:22 -07:00
2026-09-21 09:55:40 -07:00
2026-09-29 20:24:19 -04:00
2026-09-19 09:23:22 -07:00
2026-09-26 21:38:28 +05:30
2026-09-29 20:58:24 -05:00
2026-09-20 18:20:44 -07:00
2026-09-29 07:44:13 +00:00
2026-09-25 14:22:12 -04:00
2026-09-28 10:21:41 -07:00
2026-09-24 01:40:31 -04:00
2026-09-28 10:21:41 -07:00
2026-09-25 12:07:32 -05:00
2026-09-28 10:21:41 -07:00
2026-09-27 18:19:17 +05:30
2026-09-29 23:54:34 +05:30
2026-09-24 01:55:51 -04:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 23:54:34 +05:30
2026-09-29 23:54:34 +05:30
2026-09-20 13:35:09 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 22:19:53 -05:00
2026-09-28 14:16:18 -07:00
2026-09-23 10:05:40 -07:00
2026-09-29 07:44:13 +00:00
2026-09-23 17:09:54 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-20 10:52:54 -07:00
2026-09-25 21:27:06 +05:30
2026-09-19 22:57:07 -04:00
2026-09-19 09:30:56 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 20:34:45 +05:30
2026-09-29 03:28:46 +05:30
2026-09-23 19:51:34 -04:00
2026-09-28 02:00:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 13:08:49 -07:00
2026-09-20 15:17:49 +05:30
2026-09-23 15:05:44 -07:00
2026-09-29 20:24:19 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 04:04:23 -07:00
2026-09-19 16:28:57 +05:30
2026-09-22 09:55:47 -04:00
2026-09-29 20:24:19 -04:00
2026-09-28 13:30:57 -07:00
2026-09-27 02:33:57 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 04:44:29 -07:00
2026-09-18 20:02:36 -04:00
2026-09-29 07:51:44 -04:00
2026-09-29 19:49:52 -05:00
2026-09-26 21:43:07 -05:00
2026-09-28 10:21:41 -07:00
2026-09-29 20:24:19 -04:00
2026-09-21 19:08:19 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 06:42:00 -07:00
2026-09-24 01:55:51 -04:00
2026-09-27 22:04:26 -07:00
2026-09-29 12:16:43 -04:00
2026-09-29 05:59:25 -04:00
2026-09-28 12:23:25 -07:00
2026-09-23 10:42:18 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 07:44:13 +00:00
2026-09-27 01:04:39 +05:30
2026-09-21 10:11:19 -07:00
2026-09-28 04:04:23 -07:00
2026-09-28 13:30:57 -07:00
2026-09-23 10:58:15 -07:00
2026-09-28 13:30:57 -07:00
2026-09-23 07:48:32 -07:00
2026-09-21 00:58:39 -04:00
2026-09-27 02:57:28 -07:00
2026-09-29 18:49:58 -05:00
2026-09-20 10:44:52 -07:00
2026-09-21 18:56:56 -04:00
2026-09-29 18:49:58 -05:00
2026-09-29 18:09:20 -05:00
2026-09-29 02:37:33 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:56:47 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-18 22:36:24 -07:00
2026-09-27 18:29:18 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-27 18:29:18 +05:30
2026-09-20 18:43:59 -07:00
2026-09-22 13:41:11 +05:30
2026-09-28 03:37:09 -07:00
2026-09-28 03:37:09 -07:00
2026-09-23 08:09:47 -07:00
2026-09-23 11:41:01 -04:00
2026-09-28 10:21:41 -07:00
2026-09-21 23:47:51 -07:00
2026-09-28 12:24:52 -05:00
2026-09-28 19:02:20 +05:30
2026-09-25 14:22:12 -04:00
2026-09-25 14:22:12 -04:00
2026-09-21 19:08:19 -04:00
2026-09-28 04:44:29 -07:00
2026-09-25 16:28:14 -05:00
2026-09-29 19:49:52 -05:00
2026-09-28 06:42:00 -07:00
2026-09-24 01:55:51 -04:00
2026-09-29 15:45:52 +05:30
2026-09-28 14:16:18 -07:00
2026-09-20 16:41:21 +05:30
2026-09-29 16:47:48 +05:30
2026-09-23 15:26:34 -04:00
2026-09-19 02:44:02 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-26 17:04:25 -05:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:49:35 -07:00
2026-09-23 10:52:20 -04:00
2026-09-24 14:08:21 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 05:37:55 -07:00
2026-09-19 09:34:40 -07:00
2026-09-21 19:08:19 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-19 10:26:08 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 12:55:46 -07:00
2026-09-29 20:57:57 -05:00
2026-09-29 12:55:46 -07:00
2026-09-19 10:26:08 -07:00
2026-09-20 14:02:17 +05:30
2026-09-24 09:40:41 -04:00
2026-09-29 23:54:34 +05:30
2026-09-22 13:57:51 +05:30
2026-09-23 06:46:02 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 10:21:41 -07:00
2026-09-23 09:26:07 +05:30
2026-09-27 17:06:55 -07:00
2026-09-28 10:21:41 -07:00
2026-09-22 05:16:50 -04:00
2026-09-24 02:03:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-24 05:10:12 -04:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-23 12:45:32 +05:30
2026-09-28 14:16:18 -07:00
2026-09-24 14:08:21 -04:00
2026-09-24 11:50:29 -04:00
2026-09-27 06:26:52 -05:00
2026-09-24 11:50:29 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-24 11:50:29 -04:00
2026-09-25 21:19:04 +05:30
2026-09-27 01:42:52 +05:30
2026-09-28 12:18:42 -07:00
2026-09-28 09:22:11 -07:00
2026-09-22 01:19:12 -07:00
2026-09-22 17:16:00 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-25 14:22:12 -04:00
2026-09-22 05:16:50 -04:00
2026-09-22 05:16:50 -04:00
2026-09-27 01:42:52 +05:30
2026-09-25 14:22:12 -04:00
2026-09-29 15:05:57 -04:00
2026-09-24 16:17:16 -04:00
2026-09-27 06:26:52 -05:00
2026-09-27 21:29:39 -07:00
2026-09-29 20:24:19 -04:00
2026-09-23 05:37:40 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-23 05:37:40 -07:00
2026-09-28 04:04:23 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 20:57:57 -05:00
2026-09-19 03:52:12 -04:00
2026-09-23 07:36:31 -04:00
2026-09-28 04:59:38 -07:00
2026-09-21 00:58:39 -04:00
2026-09-28 12:43:03 -07:00
2026-09-21 14:02:05 -07:00
2026-09-27 03:41:42 -07:00
2026-09-18 20:02:36 -04:00
2026-09-27 00:56:11 +05:30
2026-09-20 11:19:50 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 03:34:07 -07:00
2026-09-28 10:21:41 -07:00
2026-09-24 11:50:30 -04:00
2026-09-19 22:57:07 -04:00
2026-09-24 12:30:00 -04:00
2026-09-23 22:22:32 +05:30
2026-09-26 20:40:40 -05:00
2026-09-23 15:43:51 -07:00
2026-09-25 10:46:54 -05:00
2026-09-28 15:54:01 +05:30
2026-09-28 21:03:09 -04:00
2026-09-27 20:49:04 +05:30
2026-09-24 18:08:24 +05:30
2026-09-18 22:36:41 -07:00
2026-09-27 20:49:04 +05:30
2026-09-23 10:43:45 -04:00
2026-09-28 08:33:43 +00:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:33:01 -07:00
2026-09-18 17:26:10 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-25 20:00:57 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 19:49:52 -05:00
2026-09-28 21:02:35 -04:00
2026-09-27 02:54:03 -07:00
2026-09-24 14:23:48 -04:00
2026-09-23 22:05:57 -04:00
2026-09-25 14:22:12 -04:00
2026-09-28 10:21:41 -07:00
2026-09-29 15:28:19 -05:00
2026-09-23 18:29:35 -05:00
2026-09-19 01:38:09 -04:00
2026-09-27 07:43:23 -05:00
2026-09-28 12:33:01 -07:00
2026-09-28 19:02:20 +05:30
2026-09-24 11:12:27 -04:00
2026-09-19 09:54:20 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 17:09:16 -05:00
2026-09-22 22:24:31 +00:00
2026-09-27 23:53:40 -07:00
2026-09-24 16:17:16 -04:00
2026-09-28 10:21:41 -07:00
2026-09-29 20:34:45 +05:30
2026-09-26 21:00:12 -04:00
2026-09-27 14:09:15 -05:00
2026-09-21 22:02:46 -04:00
2026-09-29 18:49:58 -05:00
2026-09-29 20:58:24 -05:00
2026-09-26 20:07:47 +05:30
2026-09-25 14:22:12 -04:00
2026-09-23 18:48:33 -05:00
2026-09-28 21:04:13 -04:00
2026-09-29 18:49:58 -05:00
2026-09-28 10:21:41 -07:00
2026-09-21 01:57:31 -07:00
2026-09-28 05:33:25 -07:00
2026-09-19 04:39:53 -04:00
2026-09-28 04:44:29 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 18:49:58 -05:00
2026-09-28 12:43:03 -07:00
2026-09-24 14:08:22 -04:00
2026-09-23 11:41:01 -04:00
2026-09-27 02:57:28 -07:00
2026-09-23 06:51:47 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 21:04:13 -04:00
2026-09-29 20:58:59 -05:00
2026-09-28 05:33:25 -07:00
2026-09-28 21:02:29 -04:00
2026-09-27 14:09:15 -05:00
2026-09-20 10:07:50 -04:00
2026-09-18 20:02:36 -04:00
2026-09-21 19:32:37 -04:00
2026-09-22 15:55:23 +05:30
2026-09-20 10:21:52 -07:00
2026-09-29 20:57:51 -05:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 16:23:22 +05:30
2026-09-29 11:40:36 -05:00
2026-09-23 03:25:06 -07:00
2026-09-28 12:33:01 -07:00
2026-09-23 15:26:34 -04:00
2026-09-28 05:37:55 -07:00
2026-09-28 12:18:58 -07:00
2026-09-19 15:04:44 +05:30
2026-09-19 15:04:44 +05:30
2026-09-29 19:06:35 -05:00
2026-09-23 06:46:02 -07:00
2026-09-23 01:16:41 -07:00
2026-09-23 11:41:01 -04:00
2026-09-28 12:18:58 -07:00
2026-09-28 12:18:58 -07:00
2026-09-21 02:56:31 -07:00
2026-09-25 12:09:37 -05:00
2026-09-29 20:57:23 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-21 14:13:07 -04:00
2026-09-29 15:24:15 +05:30
2026-09-24 15:38:22 +05:30
2026-09-23 19:51:34 -04:00