From a15cdc0abde3bbc06ff00902000b773c5abe8775 Mon Sep 17 00:00:00 2001 From: tr4m0ryp Date: Sun, 5 Apr 2026 03:52:06 +0200 Subject: [PATCH] chore: Remove dead code in payload headers Removed unused legacy aliases in shellcode.h and stub arrays in rop_a10.h/rop_a11.h. Payload assembly uses chip_db fields directly. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/exploit/payload/rop_a10.h | 20 -------------------- src/exploit/payload/rop_a11.h | 18 ------------------ src/exploit/payload/shellcode.h | 3 --- 3 files changed, 41 deletions(-) delete mode 100644 src/exploit/payload/rop_a10.h delete mode 100644 src/exploit/payload/rop_a11.h diff --git a/src/exploit/payload/rop_a10.h b/src/exploit/payload/rop_a10.h deleted file mode 100644 index 950e845..0000000 --- a/src/exploit/payload/rop_a10.h +++ /dev/null @@ -1,20 +0,0 @@ -/* rop_a10.h -- Placeholder kept for backward compatibility. - * - * The actual payload is now assembled dynamically from chip_db fields - * in assemble_payload() (checkm8_payload.c). The header struct is - * populated with per-chip addresses at runtime rather than using static - * ROP chain bytes. This file is retained so existing #include directives - * do not break. - */ - -#ifndef ROP_A10_H -#define ROP_A10_H - -#include -#include - -/* These are unused but kept to avoid breaking existing references. */ -static const uint8_t rop_chain_a10[] = { 0 }; -static const size_t rop_chain_a10_len = 0; - -#endif /* ROP_A10_H */ diff --git a/src/exploit/payload/rop_a11.h b/src/exploit/payload/rop_a11.h deleted file mode 100644 index 53277f6..0000000 --- a/src/exploit/payload/rop_a11.h +++ /dev/null @@ -1,18 +0,0 @@ -/* rop_a11.h -- Placeholder kept for backward compatibility. - * - * The actual payload is now assembled dynamically from chip_db fields - * in assemble_payload() (checkm8_payload.c). This file is retained so - * existing #include directives do not break. - */ - -#ifndef ROP_A11_H -#define ROP_A11_H - -#include -#include - -/* These are unused but kept to avoid breaking existing references. */ -static const uint8_t rop_chain_a11[] = { 0 }; -static const size_t rop_chain_a11_len = 0; - -#endif /* ROP_A11_H */ diff --git a/src/exploit/payload/shellcode.h b/src/exploit/payload/shellcode.h index 8e227b1..a923dc9 100644 --- a/src/exploit/payload/shellcode.h +++ b/src/exploit/payload/shellcode.h @@ -106,9 +106,6 @@ static const uint8_t checkm8_shellcode_armv7[] = { static const size_t checkm8_shellcode_armv7_len = sizeof(checkm8_shellcode_armv7); -/* Legacy alias used by assemble_payload */ -static const uint8_t *checkm8_shellcode = checkm8_shellcode_arm64; -static const size_t checkm8_shellcode_len = sizeof(checkm8_shellcode_arm64); /* clang-format on */ #endif /* SHELLCODE_H */