
전체 Firefox 공격 체인: CVE-2026-2796 wasm 타입 혼동 -> 콘텐츠 프로세스 RCE, 그리고 CVE-2026-2768 부모 프로세스 탈출 분석 (둘 다 Firefox 148에서 수정됨)
Firefox 풀체인 익스플로잇 연구: 렌더러 코드 실행을 위한 WebAssembly 타입
혼동에서 시작해 샌드박스 탈출을 위한 부모 프로세스 버그로 이어지는
체인입니다. 두 버그 모두 Firefox 148(MFSA-2026-13)에서 수정되었으며,
여기서의 대상은 두 수정 사항 이전인 Firefox 148-nightly 트리
@ 2fbc0748c4(2026-01-14)입니다.
page loads crafted wasm module
│
CVE-2026-2796: Function.prototype.call.bind unwrap skips signature check
│ → i64 ↔ (ref $t) confusion → addrOf/fakeobj
│ → fake WasmArrayObject → arbitrary R/W in the CONTENT process
│ → forged WasmFuncRef → hijack call target ([funcref+0x38])
▼
native code exec INSIDE the sandboxed content process (sbLevel 3)
│ (sandbox blocks exec/fork — need a parent bug)
▼
CVE-2026-2768: forge IndexedDB add/put IPC with out-of-range
mAutoIncrementKeyOffsets (ParamTraits<Key> validates nothing)
│ → parent writes 8 bytes at attacker-controlled offset
▼
memory corruption in the UNSANDBOXED parent process = full escape
| 데모 | 실행 위치 | 결과 |
|---|---|---|
poc/shell/poc-crash.js | js shell | 0xDEADBEEF를 funcref로 역참조 → 0xdeadbf2f에서 SIGSEGV |
poc/shell/poc-addrof.js | js shell | 임의 R/W 자체 테스트 통과 |
poc/shell/poc-forge.js | js shell | PC 제어: 심어둔 canary에서 크래시 |
poc/shell/poc-rce.js | js shell | system("id > /tmp/CVE-2026-2796-PWNED; open -a Calculator") — 파일에 uid=501(sid) ... 기록, Calculator 실행됨 |
poc/browser/stage1-browser.html | Nightly (sbLevel 3 콘텐츠) | 샌드박스 탭에서 임의 R/W; 위조된 funcref가 0x4141414141414141로 점프 → 탭 크래시, 부모 프로세스 생존 |
poc/browser/stage1-browser-cmd.html | Nightly (sbLevel 3 콘텐츠) | XUL 베이스 누출, posix_spawnp(0x187xxxxx) 해석 후 /bin/sh -c "touch /tmp/PWNED-FROM-CONTENT"로 호출 → macOS 샌드박스가 exec 거부: 파일 미생성, 페이지 무해 — 콘텐츠 RCE만으로는 명령 실행이 아님을 증명 |
poc/browser/sandbox-proof.html | Nightly (sbLevel 3 콘텐츠) | 샌드박스 규칙 내에서 네이티브 실행: getpid()가 탭의 실제 PID 반환(ps와 일치), 원시 libc write(1, ...)가 브라우저 터미널 로그에 출력 — fork/exec 없음, 파일 열기 없음 |
poc/browser/fd3-proof.html | Nightly (sbLevel 3 콘텐츠) | fd 3(부모 IPDL 소켓)에 32바이트 원시 데이터 기록: 부모의 IPC 파서가 공격자 바이트를 소비(Message needs unreceived descriptors ... num_handles:33), 메시지 폐기 후 탭 종료("Exiting due to channel error") — 스테이지 2가 정형화되었지만 악의적인 IndexedDB 메시지로 무기화하는 전송 프리미티브 |
poc/browser/stage2-trigger.html | Nightly | 부모 버그 경로의 순수 JS 도달 가능성(자동 증가 인덱스 키 [1,2,3,4]) |
스테이지 2의 근본 원인 분석(수정 diff, IPC 직렬화, 익스플로잇 전략)은 docs/full-escape.md를 참조하세요.
# Tree: mozilla-firefox/firefox @ 2fbc0748c4 (2026-01-14, pre-FF148)
# 1) js shell (stage-1 development, unsandboxed):
cd js/src && ../../configure --enable-debug --enable-optimize \
--without-intl-api --enable-project=js && cd _obj && make -j8
# 2) full browser (stage 2). mozconfig:
# export CC=/usr/bin/clang ; export CXX=/usr/bin/clang++
# ac_add_options --enable-application=browser
# ac_add_options --disable-debug --enable-optimize
# ac_add_options --disable-crashreporter --disable-updater --disable-tests
# ac_add_options --enable-sandbox
# ac_add_options --without-wasm-sandboxed-libraries
# requires: node, cbindgen, rustc >= 1.87, macOS CLT SDK
# local build notes:
# - private header sys/fileport.h shim added to objdir dist/include/sys/
# - one compile guard added: NSGlassEffectView (macOS 26 SDK symbol) wrapped
# in #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000 in widget/cocoa/
# nsCocoaWindow.mm (build-environment fix, no security impact)
브라우저 PoC 실행: browser.dom.window.dump.enabled=true를 설정한 프로필로
obj-browser/dist/Nightly.app을 실행하고, file://로 HTML 파일을 연 다음
stdout에서 dump() 출력을 확인하세요. 탭 크래시는 부모 로그에
process <pid> exited on signal 10으로 나타납니다.
WasmArrayObject: numElements @+16, data ptr @+24, inline data @+40.
WasmFuncRef: typeDef ptr @+0x40, call target @+0x38. JSFunction 네이티브
ptr @+0x20. js shell: os_system @ base+0x1a9f8, system GOT @
base+0x11d47b0. 브라우저: WebIDL 네이티브 코드 포인터(console.log
JSFunction +0x20)에서 0xfeedfacf Mach-O 매직까지 역방향 스캔하여 XUL
베이스 탐색; _posix_spawnp GOT @ XUL+0x9bb7d30, _getpid GOT @
XUL+0x9bb7600, _write GOT @ XUL+0x9bb87e0. 가짜 배열 윈도우는
out-of-line(malloc된) 배열에 존재해야 합니다 — 인라인/nursery 객체는 긴
스캔 중 GC에 의해 이동되기 때문입니다.
CVE-2026-2796을 통한 렌더러 코드 실행은(셸 및 브라우저) 완전히 시연되었습니다. CVE-2026-2768의 샌드박스 탈출 분석은 수정 diff에 대해 소스 검증되었으며, 실제 종단 간 부모 프로세스 손상 트리거는 작업 진행 중입니다(docs 참조). 이 연구는 방어/교육 목적이며, 해당 취약점은 현재 릴리스에서 패치되었습니다.
e2acef67c5dea6ec보안 연구, 교육 및 방어적 테스트 전용입니다. 소유하지 않았거나 명시적 테스트 권한이 없는 시스템에 사용하지 마십시오.