Description
Snap7 through 1.4.3 contains an out-of-bounds write vulnerability in the passive partner that allows a malicious active partner to overflow application buffers by declaring an unvalidated BSend total length. Attackers connecting from the configured peer address can declare up to 65535 bytes and send a short fragment, causing BRecv to memcpy past the buffer and crash or corrupt SCADA, HMI or gateway processes.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| davenardella | snap7 | ≤ 1.4.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | snap7 | No fix yet | — |
| Ubuntu 26.04 LTS | snap7 | No fix yet | — |
References
- https://github.com/davenardella/snap7/pull/41 issue-tracking patch
- https://github.com/davenardella/snap7/blob/30f37da3114024a71ba93f7fd855c680b97a406f/src/core/s7_partner.cpp#L1126-L1166 technical-description
- https://github.com/davenardella/snap7/blob/30f37da3114024a71ba93f7fd855c680b97a406f/src/core/s7_partner.cpp#L850-L867 technical-description
- VulnCheck Advisory: Snap7 through 1.4.3 Out-of-Bounds Write via BRecv and CheckAsBRecvCompletion third-party-advisory