
Standalone PoC for CVE-2026-90782: status-clobbering NULL dereference in S2OPC alloc_notification_message_items() (DataChange fails, Event succeeds)
Standalone proof-of-concept for CVE-2026-90782 in S2OPC (Safe & Secure OPC).
In alloc_notification_message_items() (S2OPC 1.7.3 and earlier):
status variable is used for both DataChange and Event allocations.status is overwritten to SOPC_STATUS_OK.dataChangeNotif pointer → NULL dereference / 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
Recommended with AddressSanitizer:
gcc -fsanitize=address -g -o s2opc_poc reproducer.c
./s2opc_poc 2
Track allocation statuses independently and early-exit / skip the dereference when DataChange allocation failed. Mirrors the pattern in commit 8848f051.
reproducer.c — mirrors the vulnerable and fixed allocation logic