From 500ed2803831d92fb6278d5202a9ce339b9ca097 Mon Sep 17 00:00:00 2001 From: TakuyaYagam1 Date: Sun, 29 Nov 2026 16:02:45 +0300 Subject: [PATCH] fix(towercore): align native selector gate - Make the authorization gate inspect the same selector record consumed by read handlers. - Retain native 0x0203 rejection for both opcode 0x21 and 0x23. --- towercore/Dockerfile.towercore | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/towercore/Dockerfile.towercore b/towercore/Dockerfile.towercore index b1e23d3..73ff7bc 100644 --- a/towercore/Dockerfile.towercore +++ b/towercore/Dockerfile.towercore @@ -7,13 +7,17 @@ from pathlib import Path path = Path("/towercore") data = bytearray(path.read_bytes()) -offset = 0x29324 -original = bytes.fromhex("03 00 55 10") -replacement = bytes.fromhex("03 00 00 10") -actual = bytes(data[offset : offset + len(original)]) -if actual != original: - raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}") -data[offset : offset + len(original)] = replacement +patches = ( + (0x292E8, bytes.fromhex("a8 01 b7 93"), bytes.fromhex("9c 01 b7 93")), + (0x292F0, bytes.fromhex("b0 01 a5 8f"), bytes.fromhex("a4 01 a5 8f")), + (0x292FC, bytes.fromhex("ac 01 a4 8f"), bytes.fromhex("a0 01 a4 8f")), + (0x29324, bytes.fromhex("03 00 55 10"), bytes.fromhex("03 00 00 10")), +) +for offset, original, replacement in patches: + actual = bytes(data[offset : offset + len(original)]) + if actual != original: + raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}") + data[offset : offset + len(original)] = replacement path.write_bytes(data) PY