| Título | Davide Nardella Snap7 <=1.4.3 (30f37da) Stack-based Buffer Overflow |
|---|
| Descripción | snap7 up to 1.4.3 is affected. The function TS7Worker::PerformFunctionWrite in src/core/s7_server.cpp of the S7 server (WriteVar / Write Request handler) uses the client-controlled item count ReqParams->ItemsCount without any bounds check to index the fixed-size stack arrays ReqData (PReqFunWriteDataItem[MaxVars]) and ResData->Data (byte[MaxVars]), where MaxVars equals 20. The sibling handler PerformFunctionRead clamps this value to MaxVars; PerformFunctionWrite does not. A crafted S7 Write Request with an item count of up to 255 overflows these stack arrays, corrupting the stack frame. The attack can be launched remotely over the S7 / ISO-on-TCP protocol (TCP port 102) without authentication. Denial of service is certain and memory corruption with attacker-influenced pointer values cannot be excluded. This issue is distinct from CVE-2026-15105, which affects the ReadVar handler PerformFunctionRead in the same file. Fix: clamp ItemsCount to MaxVars at the start of PerformFunctionWrite, mirroring PerformFunctionRead. |
|---|
| Fuente | ⚠️ https://github.com/davenardella/snap7/issues/42 |
|---|
| Usuario | GyuHyunJeon (UID 102740) |
|---|
| Sumisión | 2026-11-04 08:59 (hace 24 días) |
|---|
| Moderación | 2026-11-27 21:58 (24 days later) |
|---|
| Estado | Aceptado |
|---|
| Entrada de VulDB | 445027 [davenardella snap7 hasta 1.4.3 S7 Server WriteVar Request src/core/s7_server.cpp PerformFunctionWrite ItemsCount desbordamiento de búfer] |
|---|
| Puntos | 20 |
|---|