greenhouse: close data leaks and console UAF

This commit is contained in:
TakuyaYagam1 committed 2026-10-25 10:47:13 +03:00
1 parent 4f70df55dd
commit 6b506c0d54
4 files changed
+65 -2

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import sys
from pathlib import Path
OFFSET = 0x75AC
BEFORE = bytes.fromhex("84 c0 0f 84 5c 03 00 00 41 80 7e 0c 00 0f 84 ba 03 00 00")
AFTER = bytes.fromhex("41 80 7e 0c 00 0f 84 c2 03 00 00 84 c0 0f 84 51 03 00 00")
path = Path(sys.argv[1])
with path.open("r+b") as binary:
binary.seek(OFFSET)
current = binary.read(len(BEFORE))
if current != BEFORE:
raise SystemExit("unexpected greenhouse-console build")
binary.seek(OFFSET)
binary.write(AFTER)