Page MenuHomePhabricator

[CMAKE] Add stack protection flag
AbandonedPublic

Authored by Fabien on Mar 6 2019, 15:03.

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Summary

This adds the -fstack-protector-all flag as well as the associated
warning -Wstack-protector.

Depends on D2674

Test Plan
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v
../contrib/devtools/security-check.py src/bitcoind

Before the patch the output if the security-check script would contain
Canary, and no longer after this patch.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_hardening_stack
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5194
Build 8451: Bitcoin ABC Buildbot (legacy)
Build 8450: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 6 2019, 18:50

Just port hardening at once. Right now there are no way to check if hardening is ported properly and as this diffs proves, individual steps seems to be broken.

Fabien planned changes to this revision.Mar 13 2019, 14:52

Superseeded by D2687, can be removed when landed.