Raises main stack gap 64KB -> 1MB via sysctl #1873
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review.
Description of Changes
We're already setting this value via the
securedrop-grsec
metapackage, as described in #1861 and implemented in the grsec repo [0]. Let's also ensure it at install time by setting it directly along with the othersysctl options.
Included a config test so that test suite will fail if the sysctl doesn't stick during CI or local development.
[0] freedomofpress/ansible-role-grsecurity#100
Fixes #1861.
Testing
CI it not sufficient here, since the CI hosts don't use grsecurity-patched kernels. Run through the provisioning with staging VMs, and confirm manually that
sudo sysctl vm.heap_stack_gap
shows1048576
.Deployment
We already posted the new kernel packages in the apt repo, and the sysctl setting is set in the
securedrop-grsec
metapackage, so we're good to go for deployed instances. Adding the setting within Ansible is simply to guard against regressions, and also allows us to clean up the metapackage in the future.Checklist
If you made changes to the app code:
If you made changes to the system configuration:
If you made changes to documentation: