fix(chip-db): rebuild chip_db_table*.h from gaster canonical + strict canary
Rewrite the .name / .marketing fields and banner comments in include/device/chip_db_table.h and chip_db_table_rop.h from gaster's canonical SecureROM SRTG -> offset table (gaster.c:519-808), so the CLI announces the physical chip that is actually plugged in. Each row carries a "gaster.c:NNN" comment marker traceable to the source of truth. Offsets, CPIDs and struct layout are unchanged. Relabels: 0x8947 (was "A7 / iPhone 5s", now S5L8947 = A5 Rev B / Apple TV 3rd gen rev A); 0x8950 / 0x8955 (were "A5-class Apple TV", now A6 / A6X); 0x8960 (was "A10 / iPhone 7", now A7 / iPhone 5s); 0x8002 (was "S3 / Watch Series 3", now S1P/S2/T1 covering Watch Series 1/2 and MacBook Pro Touch Bar T1); 0x8004 GPS+Cellular qualifier dropped; 0x8000 / 0x8003 A9 Samsung/TSMC labels swapped to match APL0898 / APL1022; 0x8010 / 0x8011 marketing broadened to cover the full ship list. Add tests/chip_db_canary.c, wired as a build-time prerequisite of tr4mpass via the new Makefile .chip-db-canary target. The probe walks a golden expected (cpid, name-substr, marketing-substr, checkm8) table and fails the build on drift, defeating a repeat of issue #53. STRICT_CHIP_DB=1 by default; make STRICT_CHIP_DB=0 bypasses the probe for distro-package chip-table update races (T5 "Chip-DB canary strictness" note). Files modified: - include/device/chip_db_table.h - include/device/chip_db_table_rop.h - Makefile - .gitignore - tests/chip_db_canary.c (new) Closes: #53
This commit is contained in:
parent
d18b57a66f
commit
54c0ad652c
5 changed files with 275 additions and 95 deletions
|
|
@ -5,7 +5,16 @@
|
|||
* chip_db_table.h -- static chip table with real gaster offsets (part 1).
|
||||
*
|
||||
* Included by chip_db.c only. Do not include this file elsewhere.
|
||||
* All values sourced from gaster (github.com/0x7ff/gaster).
|
||||
* All CPIDs, iBoot SRTG strings and memory offsets are sourced from
|
||||
* gaster (github.com/0x7ff/gaster) -- specifically the SecureROM
|
||||
* SRTG -> offset dispatch block in gaster.c:519-808. Each row carries
|
||||
* a "gaster.c:NNN" marker pointing at the SRTG string check that
|
||||
* assigns its offsets, so future audits can grep the source of truth.
|
||||
*
|
||||
* Marketing / .name strings are the human-readable identity of the
|
||||
* SoC and are cross-checked against theiphonewiki.com/wiki/CHIP. They
|
||||
* are the fields the operator sees on stdout, so they must match the
|
||||
* physical device -- see issue #53 for the historical mislabel bug.
|
||||
*
|
||||
* Part 2 (ROP-capable chips and A12+ entries) is in chip_db_table_rop.h,
|
||||
* which is included at the end of the array below.
|
||||
|
|
@ -15,38 +24,15 @@
|
|||
static const chip_info_t g_chip_table[] = {
|
||||
|
||||
/* ================================================================ */
|
||||
/* ARMv7 chips (32-bit) */
|
||||
/* ARMv7 chips (32-bit) and 32-bit S-series watch SoCs */
|
||||
/* ================================================================ */
|
||||
|
||||
/* CPID 0x8947 -- A7, iPhone 5s / iPad Air */
|
||||
/* gaster: iBoot-1458.2 */
|
||||
/* A7 is Apple's first ARM64 SoC, but gaster's checkm8 path uses */
|
||||
/* payload_dest_armv7 / notA9_armv7 header -- treat as ARMv7 here. */
|
||||
{
|
||||
.cpid = 0x8947,
|
||||
.name = "A7",
|
||||
.marketing = "iPhone 5s / iPad Air",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 626,
|
||||
.config_overwrite_pad = 0x660,
|
||||
.insecure_memory_base = 0x34000000,
|
||||
.memcpy_addr = 0x9A3C,
|
||||
.aes_crypto_cmd = 0x7061,
|
||||
.gUSBSerialNumber = 0x3402DDF8,
|
||||
.dfu_handle_request = 0x3402D92C,
|
||||
.usb_core_do_transfer = 0x79ED,
|
||||
.dfu_handle_bus_reset = 0x3402D944,
|
||||
.handle_interface_request = 0x7BC9,
|
||||
.usb_create_string_descriptor = 0x72A9,
|
||||
.usb_serial_number_string_descriptor = 0x3402C2DA,
|
||||
.payload_dest_armv7 = 0x34039800,
|
||||
},
|
||||
|
||||
/* CPID 0x8950 -- S5L8950 (A5-class), Apple TV 3rd gen, iBoot-1145.3 */
|
||||
/* CPID 0x8950 -- S5L8950 = A6 (APL0598), iPhone 5 / iPhone 5c.
|
||||
* SRTG:[iBoot-1145.3]. gaster.c:519 */
|
||||
{
|
||||
.cpid = 0x8950,
|
||||
.name = "S5L8950",
|
||||
.marketing = "Apple TV (3rd gen) (A5-class)",
|
||||
.name = "A6",
|
||||
.marketing = "iPhone 5 / iPhone 5c",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 659,
|
||||
.config_overwrite_pad = 0x640,
|
||||
|
|
@ -63,11 +49,12 @@ static const chip_info_t g_chip_table[] = {
|
|||
.payload_dest_armv7 = 0x10079800,
|
||||
},
|
||||
|
||||
/* CPID 0x8955 -- S5L8955 (A5-class), Apple TV 3rd gen rev A, iBoot-1145.3.3 */
|
||||
/* CPID 0x8955 -- S5L8955 = A6X (APL5598), iPad 4th gen.
|
||||
* SRTG:[iBoot-1145.3.3]. gaster.c:534 */
|
||||
{
|
||||
.cpid = 0x8955,
|
||||
.name = "S5L8955",
|
||||
.marketing = "Apple TV (3rd gen, rev A) (A5-class)",
|
||||
.name = "A6X",
|
||||
.marketing = "iPad (4th gen)",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 659,
|
||||
.config_overwrite_pad = 0x640,
|
||||
|
|
@ -84,12 +71,35 @@ static const chip_info_t g_chip_table[] = {
|
|||
.payload_dest_armv7 = 0x10079800,
|
||||
},
|
||||
|
||||
/* CPID 0x7002 -- S1P/S2, Apple Watch Series 1/2 */
|
||||
/* gaster: iBoot-2098.0.0.2.4 */
|
||||
/* CPID 0x8947 -- S5L8947 = A5 Rev B (APL2498), Apple TV 3rd gen rev A
|
||||
* (AppleTV3,2). Single-core 32 nm die shrink of A5.
|
||||
* SRTG:[iBoot-1458.2]. gaster.c:549 */
|
||||
{
|
||||
.cpid = 0x8947,
|
||||
.name = "S5L8947",
|
||||
.marketing = "Apple TV 3rd gen (rev A) (A5 Rev B)",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 626,
|
||||
.config_overwrite_pad = 0x660,
|
||||
.insecure_memory_base = 0x34000000,
|
||||
.memcpy_addr = 0x9A3C,
|
||||
.aes_crypto_cmd = 0x7061,
|
||||
.gUSBSerialNumber = 0x3402DDF8,
|
||||
.dfu_handle_request = 0x3402D92C,
|
||||
.usb_core_do_transfer = 0x79ED,
|
||||
.dfu_handle_bus_reset = 0x3402D944,
|
||||
.handle_interface_request = 0x7BC9,
|
||||
.usb_create_string_descriptor = 0x72A9,
|
||||
.usb_serial_number_string_descriptor = 0x3402C2DA,
|
||||
.payload_dest_armv7 = 0x34039800,
|
||||
},
|
||||
|
||||
/* CPID 0x7002 -- S1P (APL0778), Apple Watch Series 1 / Series 2.
|
||||
* SRTG:[iBoot-2098.0.0.2.4]. gaster.c:610 */
|
||||
{
|
||||
.cpid = 0x7002,
|
||||
.name = "S1P",
|
||||
.marketing = "Apple Watch Series 1/2",
|
||||
.marketing = "Apple Watch Series 1 / Series 2",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x500,
|
||||
.insecure_memory_base = 0x46018000,
|
||||
|
|
@ -105,12 +115,13 @@ static const chip_info_t g_chip_table[] = {
|
|||
.payload_dest_armv7 = 0x46007800,
|
||||
},
|
||||
|
||||
/* CPID 0x8002 -- S3, Apple Watch Series 3 */
|
||||
/* gaster: iBoot-2651.0.0.1.31 */
|
||||
/* CPID 0x8002 -- T8002. Shared package family used by S1P/S2 (Watch
|
||||
* Series 1/2) and T1 (MacBook Pro Touch Bar controller).
|
||||
* SRTG:[iBoot-2651.0.0.1.31]. gaster.c:682 */
|
||||
{
|
||||
.cpid = 0x8002,
|
||||
.name = "S3",
|
||||
.marketing = "Apple Watch Series 3",
|
||||
.name = "S1P/S2/T1",
|
||||
.marketing = "Watch Series 1/2 / MacBook Pro Touch Bar (T1)",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x5C0,
|
||||
.config_hole = 5,
|
||||
|
|
@ -127,12 +138,13 @@ static const chip_info_t g_chip_table[] = {
|
|||
.payload_dest_armv7 = 0x48806E00,
|
||||
},
|
||||
|
||||
/* CPID 0x8004 -- S3, Apple Watch Series 3 (GPS+Cellular) */
|
||||
/* gaster: iBoot-2651.0.0.3.3 */
|
||||
/* CPID 0x8004 -- T8004 = S3, Apple Watch Series 3 (both GPS and
|
||||
* GPS+Cellular variants share this CPID).
|
||||
* SRTG:[iBoot-2651.0.0.3.3]. gaster.c:697 */
|
||||
{
|
||||
.cpid = 0x8004,
|
||||
.name = "S3",
|
||||
.marketing = "Apple Watch Series 3 (GPS+Cellular)",
|
||||
.marketing = "Apple Watch Series 3",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x5C0,
|
||||
.config_hole = 5,
|
||||
|
|
@ -150,11 +162,36 @@ static const chip_info_t g_chip_table[] = {
|
|||
},
|
||||
|
||||
/* ================================================================ */
|
||||
/* ARM64 chips (A8 - A9 era, no ROP gadgets needed) */
|
||||
/* ARM64 chips (A7 - A9 era, no ROP gadgets needed) */
|
||||
/* ================================================================ */
|
||||
|
||||
/* CPID 0x7000 -- A8 variant */
|
||||
/* gaster: iBoot-1992.0.0.1.19 */
|
||||
/* CPID 0x8960 -- S5L8960 = A7 (APL0698), iPhone 5s / iPad Air /
|
||||
* iPad mini 2 / iPad mini 3. Apple's first ARM64 SoC.
|
||||
* SRTG:[iBoot-1704.10]. gaster.c:564 */
|
||||
{
|
||||
.cpid = 0x8960,
|
||||
.name = "A7",
|
||||
.marketing = "iPhone 5s / iPad Air / iPad mini 2 / iPad mini 3",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 7936,
|
||||
.config_overwrite_pad = 0x5C0,
|
||||
.insecure_memory_base = 0x180380000,
|
||||
.patch_addr = 0x100005CE0,
|
||||
.memcpy_addr = 0x10000ED50,
|
||||
.aes_crypto_cmd = 0x10000B9A8,
|
||||
.boot_tramp_end = 0x1800E1000,
|
||||
.gUSBSerialNumber = 0x180086CDC,
|
||||
.dfu_handle_request = 0x180086C70,
|
||||
.usb_core_do_transfer = 0x10000CC78,
|
||||
.dfu_handle_bus_reset = 0x180086CA0,
|
||||
.handle_interface_request = 0x10000CFB4,
|
||||
.usb_create_string_descriptor = 0x10000BFEC,
|
||||
.usb_serial_number_string_descriptor = 0x180080562,
|
||||
},
|
||||
|
||||
/* CPID 0x7000 -- S5L8960-derived A8 variant (APL1011), iPod touch 6G
|
||||
* / iPad mini 4.
|
||||
* SRTG:[iBoot-1992.0.0.1.19]. gaster.c:595 */
|
||||
{
|
||||
.cpid = 0x7000,
|
||||
.name = "A8",
|
||||
|
|
@ -175,8 +212,8 @@ static const chip_info_t g_chip_table[] = {
|
|||
.usb_serial_number_string_descriptor = 0x18008062A,
|
||||
},
|
||||
|
||||
/* CPID 0x7001 -- A8X, iPad Air 2 */
|
||||
/* gaster: iBoot-1991.0.0.2.16 */
|
||||
/* CPID 0x7001 -- A8X (APL1012), iPad Air 2.
|
||||
* SRTG:[iBoot-1991.0.0.2.16]. gaster.c:580 */
|
||||
{
|
||||
.cpid = 0x7001,
|
||||
.name = "A8X",
|
||||
|
|
@ -197,35 +234,13 @@ static const chip_info_t g_chip_table[] = {
|
|||
.usb_serial_number_string_descriptor = 0x180080C2A,
|
||||
},
|
||||
|
||||
/* CPID 0x8960 -- A10 Fusion (early iBoot) */
|
||||
/* gaster: iBoot-1704.10 */
|
||||
{
|
||||
.cpid = 0x8960,
|
||||
.name = "A10 (iBoot-1704)",
|
||||
.marketing = "iPhone 7 / iPhone 7 Plus",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_large_leak = 7936,
|
||||
.config_overwrite_pad = 0x5C0,
|
||||
.insecure_memory_base = 0x180380000,
|
||||
.patch_addr = 0x100005CE0,
|
||||
.memcpy_addr = 0x10000ED50,
|
||||
.aes_crypto_cmd = 0x10000B9A8,
|
||||
.boot_tramp_end = 0x1800E1000,
|
||||
.gUSBSerialNumber = 0x180086CDC,
|
||||
.dfu_handle_request = 0x180086C70,
|
||||
.usb_core_do_transfer = 0x10000CC78,
|
||||
.dfu_handle_bus_reset = 0x180086CA0,
|
||||
.handle_interface_request = 0x10000CFB4,
|
||||
.usb_create_string_descriptor = 0x10000BFEC,
|
||||
.usb_serial_number_string_descriptor = 0x180080562,
|
||||
},
|
||||
|
||||
/* CPID 0x8000 -- A9 (TSMC), iPhone 6s */
|
||||
/* gaster: same offsets as 0x8003, iBoot-2234.0.0.2.22 */
|
||||
/* CPID 0x8000 -- S8000 = A9 Samsung 14 nm (APL0898), iPhone 6s /
|
||||
* iPhone 6s Plus / iPhone SE (1st gen).
|
||||
* SRTG:[iBoot-2234.0.0.3.3]. gaster.c:641 */
|
||||
{
|
||||
.cpid = 0x8000,
|
||||
.name = "A9",
|
||||
.marketing = "iPhone 6s / iPhone SE",
|
||||
.marketing = "iPhone 6s / 6s Plus / SE (Samsung 14 nm, APL0898)",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x500,
|
||||
.insecure_memory_base = 0x180380000,
|
||||
|
|
@ -244,12 +259,14 @@ static const chip_info_t g_chip_table[] = {
|
|||
.ttbr0_vrom_off = 0x400,
|
||||
},
|
||||
|
||||
/* CPID 0x8003 -- A9 (Samsung), iPhone 6s variant */
|
||||
/* gaster: iBoot-2234.0.0.2.22 */
|
||||
/* CPID 0x8003 -- S8003 = A9 TSMC 16 nm (APL1022), iPhone 6s /
|
||||
* iPhone 6s Plus / iPhone SE (1st gen). Offset payload matches
|
||||
* 0x8000; only the foundry-identifying CPID differs.
|
||||
* SRTG:[iBoot-2234.0.0.2.22]. gaster.c:624 */
|
||||
{
|
||||
.cpid = 0x8003,
|
||||
.name = "A9",
|
||||
.marketing = "iPhone 6s (Samsung variant)",
|
||||
.marketing = "iPhone 6s / 6s Plus / SE (TSMC 16 nm, APL1022)",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x500,
|
||||
.insecure_memory_base = 0x180380000,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
* chip_db_table_rop.h -- chip table part 2: ROP-capable chips + A12+ stubs.
|
||||
*
|
||||
* Included by chip_db_table.h inside the g_chip_table[] array.
|
||||
* Do not include this file directly. All values from gaster.
|
||||
* Do not include this file directly. All offsets from gaster.c
|
||||
* (github.com/0x7ff/gaster). Each row carries a "gaster.c:NNN" marker
|
||||
* pointing at the SRTG string check that owns those offsets.
|
||||
*/
|
||||
#ifndef CHIP_DB_TABLE_ROP_H
|
||||
#define CHIP_DB_TABLE_ROP_H
|
||||
|
|
@ -11,8 +13,8 @@
|
|||
/* ARM64 chips with ROP gadgets (A9X, A10, A10X, A11, T2) */
|
||||
/* ================================================================ */
|
||||
|
||||
/* CPID 0x8001 -- A9X, iPad Pro (1st gen) */
|
||||
/* gaster: iBoot-2481.0.0.2.1 */
|
||||
/* CPID 0x8001 -- S8001 = A9X (APL1021), iPad Pro (1st gen).
|
||||
* SRTG:[iBoot-2481.0.0.2.1]. gaster.c:658 */
|
||||
{
|
||||
.cpid = 0x8001,
|
||||
.name = "A9X",
|
||||
|
|
@ -42,12 +44,13 @@
|
|||
.ttbr0_sram_off = 0x600,
|
||||
},
|
||||
|
||||
/* CPID 0x8010 -- A10 Fusion (ROP path) */
|
||||
/* gaster: iBoot-2696.0.0.1.33 */
|
||||
/* CPID 0x8010 -- T8010 = A10 Fusion (APL1W24), iPhone 7 / iPhone 7
|
||||
* Plus / iPod touch 7 / iPad (6th gen) / iPad (7th gen).
|
||||
* SRTG:[iBoot-2696.0.0.1.33]. gaster.c:712 */
|
||||
{
|
||||
.cpid = 0x8010,
|
||||
.name = "A10 (iBoot-2696)",
|
||||
.marketing = "iPhone 7 / iPod touch 7G",
|
||||
.name = "A10",
|
||||
.marketing = "iPhone 7/7+ / iPod touch 7 / iPad 6 / iPad 7",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x5C0,
|
||||
.config_hole = 5,
|
||||
|
|
@ -73,12 +76,13 @@
|
|||
.ttbr0_sram_off = 0x600,
|
||||
},
|
||||
|
||||
/* CPID 0x8011 -- A10X Fusion, iPad Pro 10.5 / Apple TV 4K */
|
||||
/* gaster: iBoot-3135.0.0.2.3 */
|
||||
/* CPID 0x8011 -- T8011 = A10X Fusion (APL1071), iPad Pro 10.5" /
|
||||
* iPad Pro 12.9" (2nd gen) / Apple TV 4K (1st gen).
|
||||
* SRTG:[iBoot-3135.0.0.2.3]. gaster.c:736 */
|
||||
{
|
||||
.cpid = 0x8011,
|
||||
.name = "A10X",
|
||||
.marketing = "iPad Pro 10.5\" / Apple TV 4K",
|
||||
.marketing = "iPad Pro 10.5\" / iPad Pro 12.9\" (2nd gen) / Apple TV 4K",
|
||||
.checkm8_vulnerable = 1,
|
||||
.config_overwrite_pad = 0x540,
|
||||
.config_hole = 6,
|
||||
|
|
@ -104,8 +108,9 @@
|
|||
.ttbr0_sram_off = 0x600,
|
||||
},
|
||||
|
||||
/* CPID 0x8015 -- A11 Bionic, iPhone 8/X */
|
||||
/* gaster: iBoot-3332.0.0.1.23 */
|
||||
/* CPID 0x8015 -- T8015 = A11 Bionic (APL1W72), iPhone 8 /
|
||||
* iPhone 8 Plus / iPhone X.
|
||||
* SRTG:[iBoot-3332.0.0.1.23]. gaster.c:760 */
|
||||
{
|
||||
.cpid = 0x8015,
|
||||
.name = "A11",
|
||||
|
|
@ -135,8 +140,9 @@
|
|||
.ttbr0_sram_off = 0x600,
|
||||
},
|
||||
|
||||
/* CPID 0x8012 -- T2 Security Chip */
|
||||
/* gaster: iBoot-3401.0.0.1.16 */
|
||||
/* CPID 0x8012 -- T8012 = T2 Security Chip (APL1027), Mac T2 SoC
|
||||
* (iBridge2, based on A10 Fusion).
|
||||
* SRTG:[iBoot-3401.0.0.1.16]. gaster.c:784 */
|
||||
{
|
||||
.cpid = 0x8012,
|
||||
.name = "T2",
|
||||
|
|
@ -168,6 +174,9 @@
|
|||
|
||||
/* ================================================================ */
|
||||
/* A12 and later: NOT checkm8-vulnerable. All offsets zeroed. */
|
||||
/* Marketing/name entries only exist so runtime identification and */
|
||||
/* --print-chip-db can honestly report "unsupported chip" rather */
|
||||
/* than "unknown CPID". Not present in gaster (out of scope: T12). */
|
||||
/* ================================================================ */
|
||||
|
||||
{ .cpid = 0x8020, .name = "A12", .marketing = "iPhone XS / iPhone XR" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue