Page MenuHomePhabricator

[CMAKE] Add stack protection flag
AbandonedPublic

Authored by Fabien on Wed, Mar 6, 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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 5194
Build 8451: Bitcoin ABC Teamcity Staging
Build 8450: arc lint + arc unit

Event Timeline

Fabien created this revision.Wed, Mar 6, 15:03
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Mar 6, 15:03
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox accepted this revision.Wed, Mar 6, 18:50
This revision is now accepted and ready to land.Wed, Mar 6, 18:50
Fabien updated this revision to Diff 7659.Fri, Mar 8, 15:00

Rebase on top of D2674

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.Wed, Mar 13, 14:52

Superseeded by D2687, can be removed when landed.

Fabien abandoned this revision.Wed, Mar 20, 17:32

Superseeded by D2687