Skip to content

Commit

Permalink
Merge pull request #4962 from freedomofpress/4843-linux-4.14.150
Browse files Browse the repository at this point in the history
Update SecureDrop kernels to 4.14 series
  • Loading branch information
conorsch authored Nov 12, 2019
2 parents 380166c + aa2493d commit 10187b7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions install_files/ansible-base/group_vars/all/securedrop
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ securedrop_cond_reboot_file: /tmp/sd-reboot-now

# If you bump this, also remember to bump in molecule/builder/tests/vars.yml
securedrop_pkg_grsec:
ver: "4.4.182"
depends: "linux-image-4.4.177-grsec,linux-firmware-image-4.4.177-grsec,linux-image-4.4.182-grsec,linux-firmware-image-4.4.182-grsec,intel-microcode"
ver: "4.14.152"
depends: "linux-image-4.14.152-grsec-securedrop,linux-image-4.4.182-grsec,linux-firmware-image-4.4.182-grsec,intel-microcode"
5 changes: 5 additions & 0 deletions install_files/securedrop-grsec/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ case "$1" in
# highest kernel version. Any kernel provided by apt.freedom.press must
# suprecede the ones provided by Ubuntu.
sed -i '/^GRUB_DEFAULT=/s/=.*/=0/' /etc/default/grub
# 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

update-grub
;;

Expand Down
2 changes: 1 addition & 1 deletion molecule/builder-xenial/tests/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ securedrop_version: "1.2.0~rc1"
ossec_version: "3.0.0"
keyring_version: "0.1.3"
config_version: "0.1.3"
grsec_version: "4.4.182"
grsec_version: "4.14.152"

# These values will be interpolated with values populated above
# via helper functions in the tests.
Expand Down
10 changes: 4 additions & 6 deletions molecule/testinfra/staging/common/test_grsecurity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def test_ssh_motd_disabled(host):


@pytest.mark.parametrize("package", [
'linux-firmware-image-{}-grsec'.format(KERNEL_VERSION),
'linux-image-{}-grsec'.format(KERNEL_VERSION),
'linux-image-{}-grsec-securedrop'.format(KERNEL_VERSION),
'paxctl',
'securedrop-grsec',
])
Expand Down Expand Up @@ -71,8 +70,8 @@ def test_grsecurity_kernel_is_running(host):
Make sure the currently running kernel is specific grsec kernel.
"""
c = host.run('uname -r')
assert c.stdout.strip().endswith('-grsec')
assert c.stdout.strip() == '{}-grsec'.format(KERNEL_VERSION)
assert c.stdout.strip().endswith('-grsec-securedrop')
assert c.stdout.strip() == '{}-grsec-securedrop'.format(KERNEL_VERSION)


@pytest.mark.parametrize('sysctl_opt', [
Expand Down Expand Up @@ -177,7 +176,6 @@ def test_pax_flags(host, binary):
'WIMAX',
'WIRELESS',
'HAMRADIO',
'IRDA',
'BT',
])
def test_wireless_disabled_in_kernel_config(host, kernel_opts):
Expand All @@ -187,7 +185,7 @@ def test_wireless_disabled_in_kernel_config(host, kernel_opts):
disabled in the running kernel config!
"""

kernel_config_path = "/boot/config-{}-grsec".format(KERNEL_VERSION)
kernel_config_path = "/boot/config-{}-grsec-securedrop".format(KERNEL_VERSION)
kernel_config = host.file(kernel_config_path).content_string

line = "# CONFIG_{} is not set".format(kernel_opts)
Expand Down
2 changes: 1 addition & 1 deletion molecule/testinfra/staging/vars/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ log_events_with_ossec_alerts:
rule_id: "400700"

fpf_apt_repo_url: "https://apt-test.freedom.press"
grsec_version: "4.4.182"
grsec_version: "4.14.152"

0 comments on commit 10187b7

Please sign in to comment.