Executable Stack
MediumCVE-2019-8849 · Published Nov 25, 2019
swift-nio-ssl from 2.0.0 to 2.4.0 inclusive on Linux suffered from a bug where the stack of any program using it would accidentally be mapped both writable and executable. This occurred due to the linker on Linux choosing to make the stack executable if the linked output contained any assembly file that did not contain a `GNU-stack` section with the appropriate content. This was missed when porting the build over from BoringSSL's upstream build, which passes a linker flag to amend this issue. This cascades into the rest of the linkage process, causing many other binaries to be mapped rwx as well, in addition to the heap. This drastically weakens the security of the process in the face of buffer overflows or other memory mismanagement. As SwiftPM does not allow us to pass a linker flag, this is fixed by amending the source files to add this section to the assembled output when it is relevant. All affected users should update to 2.4.1, which contains a fix. If an update is not possible, one appropriate workaround is to build your SwiftPM project with `-Xlinker -z -Xlinker noexecstack` as extra flags to `swift build`. This will correctly flag the stack as non-executable.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| swift-nio-ssl Product | < 2.4.1 | 2.4.1 |
Details and references
- Severity from
- GitHub (reviewed advisory)
More Apple advisories
All Apple| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Feb 172020 | HTTP request smuggling using malformed Transfer-Encoding header | Critical | 1.14.2 |
| Aug 132019 | Apple: denial of service | High | 1.5.0 |
| Aug 132019 | Apple: denial of service | High | 1.5.0 |
| Aug 132019 | Apple: denial of service | High | 1.5.0 |
| Aug 132019 | Apple: denial of service | High | 1.5.0 |
| Aug 132019 | Apple: denial of service | High | 1.5.0 |