
PoC standalone per CVE-2026-90782: dereferenziazione NULL con status-clobbering in S2OPC alloc_notification_message_items() (DataChange fallisce, Event riesce)
Proof-of-concept autonomo per CVE-2026-90782 in S2OPC (Safe & Secure OPC).
In alloc_notification_message_items() (S2OPC 1.7.3 e precedenti):
status condivisa viene utilizzata sia per le allocazioni DataChange che per quelle Event.status viene sovrascritto con SOPC_STATUS_OK.dataChangeNotif ancora NULL → dereferenziazione NULL / crash.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
Consigliato con AddressSanitizer:
gcc -fsanitize=address -g -o s2opc_poc reproducer.c
./s2opc_poc 2
Tracciare gli stati di allocazione in modo indipendente e uscire anticipatamente / saltare la dereferenziazione quando l'allocazione DataChange fallisce. Rispecchia il pattern nel commit 8848f051.
reproducer.c — rispecchia la logica di allocazione vulnerabile e corretta