From 52c61011d4000b49edb0783fcca05952b0da7ee2 Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Mon, 8 Jul 2019 22:58:56 +0000 Subject: [PATCH 1/4] Create panic-on-oops --- usr/lib/security-misc/panic-on-oops | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 usr/lib/security-misc/panic-on-oops diff --git a/usr/lib/security-misc/panic-on-oops b/usr/lib/security-misc/panic-on-oops new file mode 100644 index 0000000..e67ab72 --- /dev/null +++ b/usr/lib/security-misc/panic-on-oops @@ -0,0 +1,7 @@ +#!/bin/bash + +## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP +## See the file COPYING for copying conditions. + +# Makes the kernel panic on oopses. +sysctl kernel.panic_on_oops=1 From 4ac700ded0cca668f585ea466e167f055783e28d Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Mon, 8 Jul 2019 22:59:39 +0000 Subject: [PATCH 2/4] Create 50panic_on_oops --- etc/X11/Xsession.d/50panic_on_oops | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/X11/Xsession.d/50panic_on_oops diff --git a/etc/X11/Xsession.d/50panic_on_oops b/etc/X11/Xsession.d/50panic_on_oops new file mode 100644 index 0000000..ef21228 --- /dev/null +++ b/etc/X11/Xsession.d/50panic_on_oops @@ -0,0 +1,8 @@ +#!/bin/sh + +## Copyright (C) 2019 - 2019 ENCRYPTED SUPPORT LP +## See the file COPYING for copying conditions. + +if [ -x /usr/lib/security-misc/panic-on-oops ]; then + sudo --non-interactive /usr/lib/security-misc/panic-on-oops +fi From 2a1742705563c264b3ea634345373cce2986d283 Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Mon, 8 Jul 2019 23:01:30 +0000 Subject: [PATCH 3/4] Create security-misc --- etc/sudoers.d/security-misc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 etc/sudoers.d/security-misc diff --git a/etc/sudoers.d/security-misc b/etc/sudoers.d/security-misc new file mode 100644 index 0000000..35081ec --- /dev/null +++ b/etc/sudoers.d/security-misc @@ -0,0 +1,4 @@ +## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP +## See the file COPYING for copying conditions. + +user ALL=NOPASSWD: /usr/lib/security-misc/panic-on-oops From 45f8102d565512938e5c533ffcd4cc06ea68b580 Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Mon, 8 Jul 2019 23:04:47 +0000 Subject: [PATCH 4/4] Update control --- debian/control | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/control b/debian/control index b7198b0..4a53e9c 100644 --- a/debian/control +++ b/debian/control @@ -118,3 +118,6 @@ Description: enhances misc security settings . The default umask is changed to 006. This allows only the owner and group to read and write to newly created files. + . + The kernel now panics on oopses to prevent it from continuing running a + flawed process.