Skip to content
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

Enable panic_on_warn=1 #268

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Kernel space:

- Restrict kernel profiling and the performance events system to `CAP_PERFMON`.

- Force the kernel to panic on "oopses" that can potentially indicate and thwart
certain kernel exploitation attempts. Optional - Force immediate reboot on the
occurrence of a kernel panic and also set panic limit to one (when using Linux kernel >= 6.2).
- Force the kernel to panic on both "oopses", which can potentially indicate and thwart
certain kernel exploitation attempts, and also kernel warnings in the `WARN()` path.
Optional - Force immediate reboot on the occurrence of a single kernel panic and also
(when using Linux kernel >= 6.2) limit the number of allowed panics to one.

- Disable the use of legacy TIOCSTI operations which can be used to inject keypresses.

Expand Down
10 changes: 5 additions & 5 deletions usr/libexec/security-misc/panic-on-oops
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then
source /usr/libexec/helper-scripts/pre.bsh
fi

## Makes the kernel panic on oopses. This prevents the kernel
## from continuing to run a flawed processes. Many kernel exploits
## will also cause an oops which this will make the kernel kill
## the offending processes.
## Makes the kernel panic on oopses and warnings. This prevents the
## kernel from continuing to run a flawed processes. Many kernel
## exploits will also cause an oops, these settings will make the
## kernel kill the offending processes.
#sysctl kernel.panic=-1
sysctl kernel.panic_on_oops=1
#sysctl kernel.panic_on_warn=1
sysctl kernel.panic_on_warn=1
#sysctl kernel.oops_limit=1
#sysctl kernel.warn_limit=1