보안 취약점 발견
보안 전문 기업 Paradigm Shift는 지난 6월 18일, Apple A12 및 A13 칩셋에서 BootROM 취약점을 발견하고 이를 'usbliter8'로 명명했다고 발표했습니다.
영향을 받는 기기
해당 취약점은 A12 및 A13 칩이 탑재된 다양한 Apple 기기에 영향을 미치며, 대상 모델은 다음과 같습니다.
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11 시리즈
- Apple Watch SE (1세대), Apple Watch Series 4, Apple Watch Series 5
- iPad Pro (1세대, 2세대, 3세대, 4세대)
- iPad (8세대, 9세대)
- iPad Air (3세대)
- iPad mini (5세대)
기술적 분석
이 취약점은 Apple A12 및 A13 칩에 내장된 DWC2 USB 컨트롤러의 하드웨어 버그와 특정 펌웨어 구성 결함이 결합되어 발생하며, 이를 통해 공격자는 애플리케이션 프로세서 부팅 체인을 완전히 장악할 수 있습니다.
해당 컨트롤러는 USB Setup 패킷을 수신할 때 링형 DMA 버퍼 메커니즘을 사용합니다. 8바이트의 Setup 패키지를 받을 때마다 DMA 주소 포인터가 8바이트씩 증가하지만, 네 번째 패키지를 처리할 때 컨트롤러가 포인터를 24바이트 뒤로 되돌려 링 구조를 유지하게 됩니다.
그러나 컨트롤러가 8바이트 미만의 패키지도 수용하면서(항상 4바이트 단위로 정렬), 실제 기록된 크기와 고정된 감소량(24바이트) 사이에 불일치가 발생하며, 결과적으로 12바이트 간격의 버퍼 언더플로우(buffer underflow) 프리미티브가 형성됩니다.
칩셋별 상세 분석
A12 모델의 경우, DWC2 USB 컨트롤러의 DMA 버퍼가 힙(heap) 영역에 위치하며 USB 작업 스택과 인접해 있습니다. 공격자는 언더플로우 프리미티브를 통해 스택에 저장된 LR 레지스터를 덮어씌워, 스케줄러가 USB 태스크로 전환될 때 PC(Program Counter)를 가로챌 수 있습니다.
A13 모델은 PAC(포인터 인증) 및 힙 메타데이터 검증 기능이 도입되어 공격 과정이 더 복잡합니다. 공격자는 이를 우회하기 위해 다음과 같은 단계를 거쳐야 합니다.
- 먼저 DART(장치 주소 재매핑 테이블) 관련 데이터 구조를 덮어씌워, DART 정리 루틴의 제로 쓰기 프리미티브를 활용해 전역 DART 포인터를 초기화함으로써 힙 검증 오류를 방지합니다.
- 그 다음 MMIO 레지스터에 0xF를 기록하여 전역 패닉(panic) 카운터를 덮어씌움으로써, 이후 발생하는 패닉이 재부팅 대신 무한 루프에 빠지도록 유도합니다.
- 정밀하게 제어된 DMA 쓰기 타이밍을 통해 USB 태스크 실행 중 임계 영역 깊이 필드를 덮어씌워 IRQ를 포함한 패닉이 무한 루프에 진입하게 만듭니다.
- 마지막으로 무한 루프 상태에서 지속적인 DMA 쓰기를 수행하여 BSS 세그먼트 내의 USB IRQ 처리 함수 포인터를 덮어씌움으로써 완전한 PC 제어권을 확보합니다.
실행 및 보안 권고
코드 실행 권한을 얻은 후, 공격자는 SecureROM 내의 희귀한 EL1 모드 전환 지점(SVC 0 명령)을 활용합니다. A12에서는 ROP 체인을 통해 DMA 목표 주소를 boot trampoline 영역으로 설정하고, 셸코드를 입력한 뒤 EL1 권한으로 실행되도록 점프합니다.
이 취약점은 소프트웨어 업데이트로 수정할 수 없으나, 공격을 위해서는 기기에 대한 물리적 접촉이 필요하며 보안 격리 프로세서(Secure Enclave Processor)를 직접 위협하지는 않습니다. Apple 측은 해당 보고를 받았으며, 사용자들이 안전을 확보하기 위해 A14 이상의 칩셋이 탑재된 기기로 업그레이드할 것을 권장하고 있습니다.
총평
이번 'usbliter8' 취약점은 Apple의 특정 칩셋에서 발생하는 하드웨어 및 펌웨어 결합 오류로 인한 BootROM 수준의 보안 위협입니다. 물리적 접근이 필요하여 즉각적인 위험도는 낮으나, 소프트웨어 패치가 불가능한 구조적 문제이므로 최신 프로세서 탑재 기기 사용이 권장됩니다.
漏洞概述
安全公司 Paradigm Shift 宣布在 Apple A12 和 A13 芯片上发现名为 usbliter8 的 BootROM 漏洞。该漏洞源于 DWC2 USB 控制器的硬件 Bug 与特定固件配置缺陷,可导致应用处理器启动链被完全攻陷。
受影响设备
该漏洞影响搭载 A12 和 A13 芯片的多种 Apple 设备:
- iPhone 系列:iPhone XS、iPhone XS Max、iPhone XR、iPhone 11、iPhone 11 Pro、iPhone 11 Pro Max、iPhone SE (第 2 代)
- Apple Watch 系列:Apple Watch SE (第一代)、Apple Watch Series 4、Apple Watch Series 5
- iPad 系列:iPad Pro (第一至第四代)、iPad (第 8 代和第 9 代)、iPad Air (第 3 代)、iPad mini (第 5 代)
技术原理与攻击路径
漏洞源于 DWC2 USB 控制器在处理 USB Setup 包时采用的环形 DMA 缓冲机制。由于控制器接受的包大小与固定的指针递减量不匹配,导致产生 12 字节步进的缓冲欠载(buffer underflow)原语。
针对不同芯片的攻击路径如下:
- A12 芯片:利用缓冲区欠载覆盖堆上相邻任务栈的 LR 寄存器,在调度器切换时劫持 PC。
- A13 芯片:由于存在 PAC 和堆元数据校验,攻击者需通过多步操作(包括清空 DART 指针、覆盖 panic 计数器、精准控制 DMA 写时机等)来绕过安全机制并获取完全的 PC 控制。
风险评估与建议
由于该漏洞属于 BootROM 级别的硬件缺陷,无法通过软件更新修复。虽然利用条件苛刻(需要物理接触设备),且不会直接威胁安全隔区处理器,但 Apple 已收到通报。官方建议用户升级至搭载 A14 及以上芯片的设备以确保安全。
总结
Paradigm Shift 披露了影响 Apple A12 和 A13 芯片的 usbliter8 BootROM 漏洞,该漏洞源于 DWC2 USB 控制器的硬件缺陷。由于该问题无法通过软件修复,受影响的 iPhone、Apple Watch 及 iPad 用户建议升级至搭载 A14 或更高版本芯片的设备以确保安全。
セキュリティ脆弱性の発見
セキュリティ専門企業であるParadigm Shiftは、6月18日、Apple A12およびA13チップセットにおいてBootROMの脆弱性を発見し、これを「usbliter8」と命名したと発表しました。
影響を受けるデバイス
この脆弱性は、A12およびA13チップを搭載した様々なAppleデバイスに影響を与えます。対象となるモデルは以下の通りです。
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11シリーズ
- Apple Watch SE(第1世代)、Apple Watch Series 4、Apple Watch Series 5
- iPad Pro(第1世代、第2世代、第3世代、第4世代)
- iPad(第8世代、第9世代)
- iPad Air(第3世代)
- iPad mini(第5世代)
技術的分析
この脆弱性は、Apple A12およびA13チップに内蔵されているDWC2 USBコントローラーのハードウェアバグと、特定のファームウェア構成の欠陥が組み合わさることで発生します。これにより、攻撃者はアプリケーションプロセッサのブートチェーンを完全に掌握することが可能になります。
当該コントローラーは、USB Setupパケットを受信する際にリング型DMAバッファメカニズムを使用します。8バイトのSetupパケットを受信するたびにDMAアドレスポインタが8バイトずつ増加しますが、4つ目のパケットを処理する際にコントローラーがポインタを24バイト戻すことでリング構造を維持します。
しかし、コントローラーが8バイト未満のパケットも受け入れる(常に4バイト単位で整列)ため、実際に記録されたサイズと固定された減少量(24バイト)の間に不一致が生じます。その結果、12バイト間隔のバッファアンダーフロー(buffer underflow)プリミティブが形成されます。
チップセット別の詳細分析
A12モデルの場合、DWC2 USBコントローラーのDMAバッファがヒープ(heap)領域に位置し、USB作業スタックと隣接しています。攻撃者はアンダーフロープリミティブを通じて、スタックに保存されたLRレジスタを上書きし、スケジューラがUSBタスクに切り替わる際にPC(プログラムカウンタ)を乗っ取ることができます。
A13モデルは、PAC(ポインタ認証)およびヒープメタデータ検証機能が導入されているため、攻撃プロセスがより複雑です。攻撃者がこれを回避するためには、以下の手順を踏む必要があります。
- まずDART(デバイスアドレス再マッピングテーブル)関連のデータ構造を上書きし、DARTクリーンアップルーチンのゼロ書き込みプリミティブを利用してグローバルDARTポインタを初期化することで、ヒープ検証エラーを防ぎます。
- 次に、MMIOレジスタに0xFを書き込んでグローバルパニック(panic)カウンターを上書きし、その後に発生するパニックが再起動の代わりに無限ループに陥るように誘導します。
- 精密に制御されたDMA書き込みタイミングを通じて、USBタスク実行中にクリティカル領域のディープフィールドを上書きし、IRQを含むパニックを無限ループに進入させます。
- 最後に、無限ループ状態において継続的なDMA書き込みを実行し、BSSセグメント内のUSB IRQ処理関数ポインタを上書きすることで、完全なPC制御権を獲得します。
実行とセキュリティに関する推奨事項
コード実行権限を取得した後、攻撃者はSecureROM内の希少なEL1モード遷移ポイント(SVC 0命令)を利用します。A12ではROPチェーンを通じてDMAターゲットアドレスをboot trampoline領域に設定し、シェルコードを入力した後にEL1権限で実行されるようジャンプします。
この脆弱性はソフトウェアアップデートで修正することはできませんが、攻撃にはデバイスへの物理的な接触が必要であり、セキュリティ隔離プロセッサ(Secure Enclave Processor)を直接脅かすものではありません。Appleは当該報告を受け取っており、ユーザーが安全を確保するためにA14以降のチップセットを搭載したデバイスへのアップグレードを推奨しています。
まとめ
「usbliter8」は、特定のAppleチップセットにおけるハードウェアとファームウェアの複合的な欠陥に起因するBootROMレベルのセキュリティ脅威です。物理的なアクセスが必要なため即時の危険度は低いものの、ソフトウェアでの修正が不可能な構造的問題であるため、最新のプロセッサを搭載したデバイスへの移行が推奨されています。
Vulnerability Discovered
On June 18, security firm Paradigm Shift announced the discovery of a BootROM vulnerability in Apple A12 and A13 chipsets, which they have named "usbliter8."
Affected Devices
The vulnerability affects various Apple devices equipped with A12 and A13 chips. The targeted models include:
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11 series
- Apple Watch SE (1st generation), Apple Watch Series 4, Apple Watch Series 5
- iPad Pro (1st, 2nd, 3rd, and 4th generation)
- iPad (8th and 9th generation)
- iPad Air (3rd generation)
- iPad mini (5th generation)
Technical Analysis
This vulnerability arises from a combination of a hardware bug in the DWC2 USB controller integrated into Apple A12 and A13 chips and specific firmware configuration flaws. These issues allow an attacker to take full control of the application processor's boot chain.
The controller utilizes a ring DMA buffer mechanism when receiving USB Setup packets. While the DMA address pointer increases by 8 bytes for every 8-byte Setup packet received, the controller resets the pointer by 24 bytes when processing the fourth packet to maintain the ring structure.
However, because the controller also accepts packets smaller than 8 bytes (always aligned in 4-byte units), a discrepancy occurs between the actual recorded size and the fixed reduction amount of 24 bytes. This results in a buffer underflow primitive at 12-byte intervals.
Detailed Analysis by Chipset
In A12 models, the DWC2 USB controller's DMA buffer is located in the heap area adjacent to the USB task stack. Attackers can use the underflow primitive to overwrite the LR register stored in the stack, allowing them to hijack the Program Counter (PC) when the scheduler switches to a USB task.
The A13 model incorporates PAC (Pointer Authentication) and heap metadata verification, making the exploitation process more complex. To bypass these protections, attackers must perform the following steps:
- First, they overwrite DART (Device Address Remapping Table) data structures to utilize zero-write primitives in the DART cleanup routine, initializing global DART pointers to prevent heap validation errors.
- Next, they write 0xF to MMIO registers to overwrite the global panic counter, ensuring that subsequent panics result in an infinite loop rather than a reboot.
- Through precisely timed DMA writes, they overwrite critical fields during USB task execution, causing IRQ-related panics to enter an infinite loop.
- Finally, while in the infinite loop state, they perform continuous DMA writes to overwrite USB IRQ handling function pointers within the BSS segment, securing full control over the PC.
Execution and Security Recommendations
After gaining code execution privileges, attackers can exploit a rare EL1 mode transition point (SVC 0 command) within SecureROM. On A12 chips, an ROP chain is used to set the DMA target address to the boot trampoline area, followed by injecting shellcode and jumping to execute it with EL1 permissions.
This vulnerability cannot be fixed through software updates as it is a structural issue involving hardware and firmware. However, exploiting it requires physical access to the device and does not directly threaten the Secure Enclave Processor (SEP). Apple has received the report and recommends that users upgrade to devices equipped with A14 or newer chipsets to ensure security.
Summary
The "usbliter8" vulnerability is a BootROM-level threat caused by hardware and firmware flaws in specific Apple chipsets. While the immediate risk is low because it requires physical access, the issue cannot be patched via software, making it advisable for users to move to devices with A14 or later processors.
漏洞概述
安全公司 Paradigm Shift 宣布在 Apple A12 和 A13 芯片上发现名为 usbliter8 的 BootROM 漏洞。该漏洞源于 DWC2 USB 控制器的硬件 Bug 与特定固件配置缺陷,允许攻击者通过特定的 USB Setup 包触发缓冲欠载(buffer underflow),从而实现对应用处理器启动链的完全攻陷。
受影响设备
该漏洞涉及搭载 A12 和 A13 芯片的多款 Apple 设备:
- iPhone 系列:iPhone XS、iPhone XS Max、iPhone XR、iPhone 11、iPhone 11 Pro、iPhone 11 Pro Max、iPhone SE (第 2 代)
- Apple Watch 系列:Apple Watch SE (第一代)、Apple Watch Series 4、Apple Watch Series 5
- iPad 系列:iPad Pro (第一至第四代)、iPad (第 8 和 第 9 代)、iPad Air (第 3 代)、iPad mini (第 5 代)
技术原理与攻击路径
漏洞的核心在于 DWC2 USB 控制器在处理特定长度的包时,指针递增量与固定递减量不匹配。针对不同芯片,攻击者的操作路径有所不同:
- A12 芯片:利用缓冲欠载覆盖堆中紧邻 USB 任务栈的 LR 寄存器,在调度器切换回任务时劫持 PC。
- A13 芯片:由于具备 PAC 和堆元数据校验,攻击者需采取多步操作,包括清空 DART 指针、绕过 panic 计数器、覆盖临界区深度字段以及重写 BSS 段中的函数指针。
在获得代码执行权限后,攻击者可利用 SecureROM 中罕见的 EL1 模式切换点(SVC 0 指令)获取高权限控制。
风险评估与建议
由于该漏洞属于硬件层面的缺陷,无法通过软件更新修复。虽然利用条件苛刻(需要物理接触设备且不直接威胁安全隔区处理器),但 Apple 已收到通报并建议用户升级至搭载 A14 及以上芯片的设备以确保安全性。
总结
Paradigm Shift 披露了影响 Apple A12 和 A13 芯片的 usbliter8 BootROM 漏洞,该漏洞源于 DWC2 USB 控制器的硬件缺陷。由于该问题无法通过软件修复且涉及核心底层安全,Apple 建议受影响用户更换至搭载 A14 或更高版本芯片的设备。
セキュリティ脆弱性の発見
セキュリティ専門企業Paradigm Shiftは、6月18日にApple A12およびA13チップセットにおいてBootROMの脆弱性を発見し、「usbliter8」と命名したことを発表しました。
対象となるデバイス
この脆弱性は、A12およびA13チップを搭載する様々なAppleデバイスに影響を与えます。対象となるモデルは以下の通りです。
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11シリーズ
- Apple Watch SE(第1世代)、Apple Watch Series 4、Apple Watch Series 5
- iPad Pro(第1世代、第2世代、第3世代、第4世代)
- iPad(第8世代、第9世代)
- iPad Air(第3世代)
- iPad mini(第5世代)
技術的分析
この脆弱性は、Apple A12およびA13チップに内蔵されているDWC2 USBコントローラーのハードウェアバグと、特定のファームウェア構成の欠陥が組み合わさることで発生します。これにより、攻撃者はアプリケーションプロセッサのブートチェーンを完全に掌握することが可能になります。
このコントローラーはUSB Setupパケットを受信する際にリング型DMAバッファメカニズムを使用します。8バイトのSetupパケットを受信するたびにDMAアドレスポインタが8バイトずつ増加しますが、4つ目のパケットを処理する際にコントローラーがポインタを24バイト戻すことでリング構造を維持します。
しかし、コントローラーが8バイト未満のパケットも受け入れる(常に4バイト単位で整列)ため、実際に記録されたサイズと固定された減少量(24バイト)の間に不一致が生じ、結果として12バイト間隔のバッファアンダーフロー(buffer underflow)プリミティブが形成されます。
チップセット別の詳細分析
A12モデルの場合、DWC2 USBコントローラーのDMAバッファがヒープ(heap)領域に位置し、USBタスクスタックと近接しています。攻撃者はアンダーフロープリミティブを通じてスタック内のLRレジスタを上書きし、スケジューラがUSBタスクに切り替わる際にPC(プログラムカウンタ)を奪取することができます。
A13モデルは、PAC(ポインタ認証)およびヒープメタデータ検証機能が導入されているため、攻撃プロセスがより複雑です。攻撃者がこれらを回避するためには、以下のステップを踏む必要があります。
- まずDART(デバイスアドレス再マッピングテーブル)関連のデータ構造を上書きし、DARTクリーンアップルーチンのゼロ書き込みプリミティブを利用してグローバルDARTポインタを初期化することで、ヒープ検証エラーを防ぎます。
- 次にMMIOレジスタに0xFを書き込んでグローバルパニック(panic)カウンターを上書きし、その後に発生するパニックが再起動の代わりに無限ループに陥るように誘導します。
- 精密に制御されたDMA書き込みタイミングを通じて、USBタスク実行中にクリティカル領域のディープフィールドを上書きし、IRQを含むパニックを無限ループに移行させます。
- 最後に、無限ループ状態での継続的なDMA書き込みにより、BSSセグメント内のUSB IRQ処理関数ポインタを上書きすることで、完全なPC制御権を獲得します。
実行とセキュリティ勧告
コード実行権限を獲得した後、攻撃者はSecureROM内の希少なEL1モード遷移ポイント(SVC 0命令)を利用します。A12ではROPチェーンを通じてDMAターゲットアドレスをboot trampoline領域に設定し、シェルコードを入力した後にEL1権限で実行されるようジャンプします。
この脆弱性はソフトウェアアップデートで修正することはできませんが、攻撃を実行するにはデバイスへの物理的な接触が必要であり、セキュリティ隔離プロセッサ(Secure Enclave Processor)を直接脅かすものではありません。Appleは本報告を受理しています。
まとめ
AppleのA12およびA13チップにおいて、DWC2 USBコントローラーの不備に起因する「usbliter8」というBootROM脆弱性が発見されました。この脆弱性は特定の条件下でブートチェーンの乗っ取りを可能にするものですが、攻撃には物理的な接触が必要であり、Secure Enclave Processorへの直接的な影響はありません。なお、この問題はハードウェアおよびファームウェアに起因するため、ソフトウェアアップデートによる修正は不可能です。
Security Vulnerability Identified
On June 18, security firm Paradigm Shift announced the discovery of a BootROM vulnerability in Apple A12 and A13 chipsets, which they have named 'usbliter8'.
Affected Devices
The vulnerability affects various Apple devices equipped with A12 and A13 chips. The target models include:
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11 series
- Apple Watch SE (1st generation), Apple Watch Series 4, Apple Watch Series 5
- iPad Pro (1st, 2nd, 3rd, and 4th generation)
- iPad (8th and 9th generation)
- iPad Air (3rd generation)
- iPad mini (5th generation)
Technical Analysis
This vulnerability arises from a combination of a hardware bug in the DWC2 USB controller integrated into Apple A12 and A13 chips and specific firmware configuration flaws. This allows an attacker to take full control of the application processor's boot chain.
The controller utilizes a ring DMA buffer mechanism when receiving USB Setup packets. For every 8-byte Setup packet received, the DMA address pointer increases by 8 bytes; however, when processing the fourth packet, the controller moves the pointer back by 24 bytes to maintain the ring structure.
Because the controller also accepts packets smaller than 8 bytes (always aligned to 4 bytes), a discrepancy occurs between the actual recorded size and the fixed decrement value of 24 bytes. This results in a buffer underflow primitive at 12-byte intervals.
Detailed Analysis by Chipset
In A12 models, the DWC2 USB controller's DMA buffer is located in the heap area adjacent to the USB task stack. An attacker can use the underflow primitive to overwrite the LR register stored in the stack, allowing them to hijack the PC (Program Counter) when the scheduler switches to a USB task.
The A13 model incorporates PAC (Pointer Authentication) and heap metadata verification, making the exploitation process more complex. To bypass these protections, an attacker must perform the following steps:
- First, overwrite DART (Device Address Remapping Table) related data structures to utilize a zero-write primitive from the DART cleanup routine, thereby initializing the global DART pointer to prevent heap verification errors.
- Next, write 0xF to MMIO registers to overwrite the global panic counter, ensuring that subsequent panics result in an infinite loop rather than a reboot.
- Through precisely controlled DMA write timing, the attacker can overwrite the critical area depth field during USB task execution, causing any panics involving IRQs to enter an infinite loop.
- Finally, by performing continuous DMA writes while in the infinite loop state, the attacker can overwrite the USB IRQ handling function pointers within the BSS segment to gain full control of the PC.
Execution and Security Recommendations
After obtaining code execution privileges, an attacker can exploit rare EL1 mode transition points (SVC 0 commands) within the SecureROM. On A12 models, a ROP chain is used to set the DMA target address to the boot trampoline area, followed by injecting shellcode and jumping to execute it with EL1 privileges.
This vulnerability cannot be patched through software updates; however, exploiting it requires physical access to the device. Furthermore, it does not directly threaten the Secure Enclave Processor (SEP). Apple has acknowledged the report.
Summary
The 'usbliter8' vulnerability is a BootROM flaw in Apple A12 and A13 chipsets caused by hardware and firmware issues in the DWC2 USB controller. While it allows an attacker to seize control of the application processor boot chain, it requires physical access to exploit and cannot be fixed via software updates. The vulnerability does not directly compromise the Secure Enclave Processor.
漏洞概述
安全公司 Paradigm Shift 宣布在 Apple A12 和 A13 芯片上发现名为 usbliter8 的 BootROM 漏洞。该漏洞源于 DWC2 USB 控制器的硬件 Bug 与特定固件配置缺陷,可能导致应用处理器启动链被完全攻陷。
受影响机型
以下搭载 A12 和 A13 芯片的设备受到此漏洞影响:
- iPhone 系列:iPhone XS、iPhone XS Max、iPhone XR、iPhone 11、iPhone 11 Pro、iPhone 11 Pro Max、iPhone SE (第 2 代)
- iPad 系列:iPad Pro (第一代、第二代、第三代、第四代)、iPad (第 8 代、第 9 代)、iPad Air (第 3 代)、iPad mini (第 5 代)
- Apple Watch 系列:Apple Watch SE (第一代)、Apple Watch Series 4、Apple Watch Series 5
技术原理
该漏洞利用 DWC2 USB 控制器在处理 USB Setup 包时的环形 DMA 缓冲机制。由于控制器接受的包大小与固定的指针递减量不匹配,导致产生 12 字节步进的缓冲区欠载(buffer underflow)原语。
针对不同芯片的攻击路径如下:
- A12 芯片:利用 DMA 缓冲区位于堆中且紧邻任务栈的特性,通过覆盖 LR 寄存器来劫持 PC。
- A13 芯片:由于引入了 PAC 和堆元数据校验,攻击者需执行多步操作(如清空 DART 指针、覆盖 panic 计数器、精确控制 DMA 写入时机等)来绕过安全机制并获取完全的 PC 控制。
风险评估与建议
该漏洞无法通过软件修复。虽然利用条件苛刻(需要物理接触设备),且不会直接威胁到安全隔区处理器,但由于硬件缺陷的存在,Apple 已收到相关通报,并建议用户升级至搭载 A14 及以上芯片的设备以确保安全。
总结
Paradigm Shift 披露了影响 Apple A12 和 A13 芯片的 usbliter8 BootROM 漏洞,该漏洞源于 DWC2 USB 控制器的硬件缺陷。虽然攻击者可通过特定步骤获取系统权限,但由于需要物理接触且无法通过软件修复,Apple 建议用户更换至 A14 及以上芯片的设备。
セキュリティ脆弱性の発見
セキュリティ専門企業であるParadigm Shiftは、6月18日、Apple A12およびA13チップセットにおいてBootROMの脆弱性を発見し、これを「usbliter8」と命名したことを発表しました。
影響を受けるデバイス
この脆弱性は、A12およびA13チップを搭載する以下のAppleデバイスに影響を与えます。
- iPhoneシリーズ:iPhone XS、iPhone XS Max、iPhone XR、iPhone 11、iPhone 11 Pro、iPhone 11 Pro Max、iPhone SE(第2世代)
- Apple Watchシリーズ:Apple Watch SE(第1世代)、Apple Watch Series 4、Apple Watch Series 5
- iPadシリーズ:iPad Pro(第1〜4世代)、iPad(第8・9世代)、iPad Air(第3世代)、iPad mini(第5世代)
技術的分析
この脆弱性は、Apple A12およびA13チップに内蔵されているDWC2 USBコントローラーのハードウェアバグと、特定のファームウェア構成の欠陥が組み合わさることで発生します。これにより、攻撃者はアプリケーションプロセッサのブートチェーンを完全に掌握することが可能になります。
当該コントローラーは、USB Setupパケットを受信する際にリング型DMAバッファメカニズムを使用しています。8バイトのSetupパケットを受信するたびにDMAアドレスポインタが8バイトずつ増加しますが、4つ目のパケットを処理する際にコントローラーがポインタを24バイト戻すことでリング構造を維持します。
しかし、コントローラーが8バイト未満のパケットも受け入れる(常に4バイト単位で整列)ため、実際に記録されたサイズと固定された減少量(24バイト)の間に不一致が生じます。その結果、12バイト間隔のバッファアンダーフロー(buffer underflow)プリミティブが形成されます。
チップセット別の詳細分析
A12モデルの場合、DWC2 USBコントローラーのDMAバッファがヒープ(heap)領域に位置し、USB作業スタックと隣接しています。攻撃者はアンダーフロープリミティブを通じて、スタックに保存されたLRレジスタを上書きし、スケジューラがUSBタスクに切り替わる際にPC(プログラムカウンタ)を乗っ取ることができます。
A13モデルは、PAC(ポインタ認証)およびヒープメタデータ検証機能が導入されているため、攻撃プロセスがより複雑です。攻撃者がこれを回避するためには、以下の手順を踏む必要があります。
- まずDART(デバイスアドレス再マッピングテーブル)関連のデータ構造を上書きし、DARTクリーンアップルーチンのゼロ書き込みプリミティブを利用してグローバルDARTポインタを初期化することで、ヒープ検証エラーを防ぎます。
- 次に、MMIOレジスタに0xFを書き込んでグローバルパニック(panic)カウンターを上書きし、その後に発生するパニックが再起動の代わりに無限ループに陥るように誘導します。
- 精密に制御されたDMA書き込みタイミングを通じて、USBタスク実行中にクリティカル領域のディープフィールドを上書きし、IRQを含むパニックを無限ループに進入させます。
- 最後に、無限ループ状態において継続的なDMA書き込みを実行し、BSSセグメント内のUSB IRQ処理関数ポインタを上書きすることで、完全なPC制御権を獲得します。
実行とセキュリティに関する推奨事項
コード実行権限を獲得した後、攻撃者はSecureROM内の希少なEL1モード遷移ポイント(SVC 0命令)を利用します。A12ではROPチェーンを通じてDMAターゲットアドレスをboot trampoline領域に設定し、シェルコードを入力した後にEL1権限で実行されるようジャンプします。
この脆弱性はBootROMレベルのハードウェア欠陥であるため、ソフトウェアアップデートによる修正は不可能です。ただし、攻撃にはデバイスへの物理的な接触が必要であり、セキュリティ隔離プロセッサ(Secure Enclave Processor)を直接脅かすものではありません。Appleはこの報告を受け取っており、ユーザーが安全を確保するためにA14以降のチップセットを搭載したデバイスへのアップグレードを推奨しています。
まとめ
「usbliter8」は、Apple A12およびA13チップのDWC2 USBコントローラーに起因するBootROMレベルの脆弱性です。物理的なアクセスが必要なため即時のリスクは限定的ですが、ソフトウェアでの修正が不可能な構造的問題であるため、最新のプロセッサを搭載したデバイスへの移行が推奨されています。
Security Vulnerability Discovered
On June 18, security firm Paradigm Shift announced the discovery of a BootROM vulnerability in Apple A12 and A13 chipsets, which they have named "usbliter8."
Affected Devices
The vulnerability affects various Apple devices equipped with A12 and A13 chips. The affected models include:
- iPhone XS, iPhone XS Max, iPhone XR, iPhone 11 series, iPhone 11 Pro, iPhone 11 Pro Max, iPhone SE (2nd generation)
- Apple Watch SE (1st generation), Apple Watch Series 4, Apple Watch Series 5
- iPad Pro (1st, 2nd, 3rd, and 4th generation)
- iPad (8th and 9th generation)
- iPad Air (3rd generation)
- iPad mini (5th generation)
Technical Analysis
This vulnerability arises from a combination of a hardware bug in the DWC2 USB controller integrated into Apple A12 and A13 chips and specific firmware configuration flaws. This allows an attacker to take full control of the application processor's boot chain.
The controller utilizes a ring DMA buffer mechanism when receiving USB Setup packets. For every 8-byte Setup packet received, the DMA address pointer increases by 8 bytes; however, when processing the fourth packet, the controller moves the pointer back by 24 bytes to maintain the ring structure.
Because the controller also accepts packets smaller than 8 bytes (always aligned to 4-byte units), a discrepancy occurs between the actual recorded size and the fixed decrement of 24 bytes. This results in a buffer underflow primitive at 12-byte intervals.
Detailed Analysis by Chipset
In A12 models, the DWC2 USB controller's DMA buffer is located in the heap area and is adjacent to the USB task stack. Attackers can use the underflow primitive to overwrite the LR register stored on the stack, allowing them to hijack the PC (Program Counter) when the scheduler switches to a USB task.
The A13 model incorporates PAC (Pointer Authentication) and heap metadata verification, making the attack process more complex. To bypass these protections, an attacker must perform the following steps:
- First, overwrite DART (Device Address Remapping Table) related data structures to utilize a zero-write primitive in the DART cleanup routine, initializing the global DART pointer to prevent heap verification errors.
- Next, write 0xF to MMIO registers to overwrite the global panic counter, ensuring that subsequent panics result in an infinite loop rather than a reboot.
- Through precisely controlled DMA write timing, the attacker can overwrite deep fields in critical areas during USB task execution, forcing any panics (including those involving IRQs) into an infinite loop.
- Finally, while in the infinite loop state, continuous DMA writes are performed to overwrite the USB IRQ handling function pointer within the BSS segment, securing full control of the PC.
Execution and Security Recommendations
After obtaining code execution privileges, attackers can utilize a rare EL1 mode transition point (SVC 0 instruction) within the SecureROM. On A12 chips, an ROP chain is used to set the DMA target address to the boot trampoline area, followed by injecting shellcode and jumping to execute it with EL1 privileges.
This vulnerability cannot be fixed via software updates; however, exploiting it requires physical access to the device and does not directly threaten the Secure Enclave Processor. Apple has received the report and recommends that users upgrade to devices equipped with A14 or newer chipsets to ensure their security.
Summary
The "usbliter8" vulnerability is a BootROM-level threat caused by hardware and firmware flaws in specific Apple chipsets. While the risk of immediate exploitation is low due to the requirement for physical access, it is a structural issue that cannot be patched via software, leading to recommendations that users move to devices with A14 or newer processors.