liuhao1024
4ead464f97
fix(security): guard os.chmod(parent) against / and top-level dirs
...
Five call sites do os.chmod(path.parent, 0o700) without checking that
the parent resolves to a safe directory. If HERMES_HOME or another
path env var resolves to /, the chmod strips traversal permission from
the root inode and bricks the entire host.
Add secure_parent_dir() to hermes_constants.py that refuses to chmod
/ or any top-level directory (depth < 2). Replace all 5 call sites
with this helper.
Fixes #25821
2026-05-20 22:56:55 -07:00
..
2026-05-19 03:05:10 -07:00
2026-05-18 10:14:38 -07:00
2026-05-20 02:44:08 -07:00
2026-05-20 11:44:10 -07:00
2026-05-20 11:44:10 -07:00
2026-05-14 19:08:38 -07:00
2026-05-20 22:55:31 -07:00
2026-05-20 22:12:09 -07:00
2026-05-17 23:28:45 -07:00
2026-05-17 02:29:41 -07:00
2026-05-18 21:54:56 -07:00
2026-05-15 14:06:51 -07:00
2026-05-20 14:31:22 -07:00
2026-05-14 22:27:09 -07:00
2026-05-19 00:11:44 -07:00
2026-05-18 21:07:03 -07:00
2026-05-20 15:04:01 -07:00
2026-05-17 02:29:41 -07:00
2026-05-18 22:36:11 -07:00
2026-05-18 21:43:59 -07:00
2026-05-12 20:46:04 -07:00
2026-05-14 14:51:07 -07:00
2026-05-08 14:43:13 -07:00
2026-05-20 22:56:55 -07:00
2026-05-19 01:28:32 -07:00
2026-05-09 02:09:35 -07:00
2026-05-20 13:00:57 -07:00
2026-05-14 09:05:31 -07:00
2026-05-14 07:08:45 -07:00
2026-05-07 13:04:08 -07:00
2026-05-08 14:27:40 -07:00
2026-05-17 02:29:41 -07:00
2026-05-07 13:41:16 -07:00
2026-05-18 10:34:03 -07:00
2026-05-15 10:36:38 +05:30
2026-05-16 12:15:45 -07:00
2026-05-07 06:35:54 -07:00
2026-05-18 20:35:00 -07:00
2026-05-16 00:57:39 -07:00
2026-05-18 17:39:50 +00:00
2026-05-07 13:04:08 -07:00
2026-05-17 02:29:41 -07:00
2026-05-14 08:03:33 -07:00
2026-05-07 05:46:05 -07:00
2026-05-19 22:34:05 -07:00