-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disables IPv6 via cmdline option for Focal #5810
Conversation
Marking WIP because I encountered the following error during local testing on Qubes staging:
A reboot of the VM resolved, which seems to suggest an iptables ratelimit on SSH. Can't see how that's related, so more testing required. |
1f2f575
to
ecbfb47
Compare
ecbfb47
to
6ca880e
Compare
Updated the sysctl syntax to skip ipv6 settings under Focal, since disabling boot time means the associated sysctl tasks will fail. Waiting for CI to pass, then will mark ready. |
Ah, I saw that same connection error on Qubes. Good. 😄 |
Hmm, based on CI failure in https://app.circleci.com/pipelines/github/freedomofpress/securedrop/1982/workflows/4abc8b06-ffb1-4c22-a117-24a7d72ef407/jobs/51269, looks like the |
Ah, that's another error I saw but hadn't had time to dig into. |
It looks to me like the package simply wasn't being held, so I've tacked on a commit to hold it and see if that resolves. The "last hyphen" you mention shouldn't matter in this context, since apt will still find it and pull it in. Let's see what CI thinks of that idea. |
413bae2
to
c2a46a3
Compare
I just got through a clean Focal staging run on Qubes. No IPv6 addresses on any interface, app or mon. I kicked CI in the hopes that it might be similarly happy. |
c2a46a3
to
5620ecc
Compare
Thanks, @rmol. I'm definitely seeing the tests passing on Focal locally. To get CI happy, I just pushed another small diff to the package-hold logic that should resolve for Xenial, too:
CI running now. |
@@ -28,7 +28,7 @@ set_grub_default() { | |||
# When using CONFIG_PAX_KERNEXEC, the grsecurity team recommends the kernel | |||
# is booted with "noefi" on the kernel command line if "CONFIG_EFI" is | |||
# enabled, as EFI runtime services are necessarily mapped as RWX. | |||
sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT=/s/=.*/=\"noefi\"/' /etc/default/grub | |||
perl -pi -e 's|^GRUB_CMDLINE_LINUX_DEFAULT=|GRUB_CMDLINE_LINUX_DEFAULT="noefi ipv6.disable=1"|' /etc/default/grub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This perl
expression is causing the trouble.
This CI failure is valid:
not sure why. |
The securedrop-grsec package is installed by both local debs and through apt-test, in the staging scenario. The test failure here might be related to holding the package in https://github.com/freedomofpress/securedrop/pull/5810/files#diff-8164feba234adc81cf7c91b9f402a0a90f3f7bc1983231168a61db05f56be279R10 The failing test ( |
Magnificent, so at least marking the package as held gets the relevant tests passing, so the boot option is enabled and IPv6 is fully disabled on Focal. That's good! Looking at the unattended-upgrades test failure locally. We mark all of the locally built packages in staging as held, so I'm surprised that |
Adds a Focal-only cmdline option for the boot to disable IPv6 functionality completely. Adds a config test to ensure no IPv6 addresses are assigned. Since the IPv6 stack is disabled at boot time, the associated sysctl tasks won't exist. Therefore we'll add those only on Xenial. This is the type of config that could be moved into a metapackage.
Ensures that the "securedrop-grsec" package built locally for staging takes precedence, so that the version served from the apt-test.freedom.press repository doesn't win out.
Adding the old style sed command instead of the perl command. This makes sure that we have only one value within double quotes in the correct location in /etc/default/grub.
Bzzzt. 🙂 You were right; that wasn't it. It's just the default preferences. With the local filenames matching apt-test and the hold reverted, apt still prefers installing from apt-test:
|
Thanks for testing, @rmol! At least that's predictable: it seems the lack of a hold on that package would explain the behavior we're seeing nicely. I've got a potential fix (works locally, anyway) running over here: https://app.circleci.com/pipelines/github/freedomofpress/securedrop/2012/workflows/66426b84-4c72-451b-83f7-2e0a342653ab Didn't want to append here until I was sure that works, especially since you were looking into the problem, as well. |
1f68980
to
0f94db2
Compare
Aye, we have fully green CI! https://app.circleci.com/pipelines/github/freedomofpress/securedrop/2012/workflows/66426b84-4c72-451b-83f7-2e0a342653ab I've pushed those same commits here, waiting on confirmation of green across the board. |
@@ -53,22 +53,16 @@ | |||
tags: | |||
- ntp | |||
|
|||
- name: Disable VirtualBox service vboxadd to avoid conflict with systemd-timesyncd. | |||
- name: Disable VirtualBox services to avoid conflict with systemd-timesyncd. | |||
systemd: | |||
name: vboxadd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be {{ item}}
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixing...
The VirtualBox services are CI/dev-specific, and won't exist on hardware. Don't fail if the services aren't found.
Adds the "dry-run" flag so that system state is not changed during the test.
0f94db2
to
600fcfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebuilt staging, all good, no IPv6.
Status
Ready for review
Description of Changes
Fixes #5807
Adds a Focal-only cmdline option for the boot to disable IPv6
functionality completely. Adds a config test to ensure no IPv6 addresses
are assigned.
Testing
sudo ip addr
and ensure you see no IPv6 addresses on any interface.Deployment
Changes are Focal-specific, Xenial behavior remains unchanged.