
CVE-2026-90782 독립형 PoC: S2OPC alloc_notification_message_items()의 상태 덮어쓰기 NULL 역참조 (DataChange 실패, Event 성공)
S2OPC(Safe & Secure OPC)의 CVE-2026-90782에 대한 독립 실행형 개념 증명(PoC).
alloc_notification_message_items() (S2OPC 1.7.3 및 이전 버전):
status 변수가 사용됩니다.status가 SOPC_STATUS_OK로 덮어쓰여집니다.dataChangeNotif 포인터를 역참조합니다 → NULL 역참조 / 크래시.gcc -o s2opc_poc reproducer.c
# Test 1 — both allocations succeed (no crash)
./s2opc_poc 1
# Test 2 — vulnerable path: DataChange fails, Event succeeds → NULL deref (crash)
./s2opc_poc 2
# Test 3 — fixed path: independent status tracking, no crash
./s2opc_poc 3
# Test 4 — control: data-only (no Event alloc to clobber status)
./s2opc_poc 4
AddressSanitizer와 함께 사용하는 것을 권장합니다:
gcc -fsanitize=address -g -o s2opc_poc reproducer.c
./s2opc_poc 2
할당 상태를 독립적으로 추적하고 DataChange 할당이 실패했을 때 조기 종료하거나 역참조를 건너뜁니다. 커밋 8848f051의 패턴을 따릅니다.
reproducer.c — 취약한 할당 로직과 수정된 할당 로직을 반영합니다