Set kernel.kptr_restrict=1 in the shipped sysctl drop-in - #9288
Open
fresh3nough wants to merge 1 commit into
Open
Set kernel.kptr_restrict=1 in the shipped sysctl drop-in#9288fresh3nough wants to merge 1 commit into
fresh3nough wants to merge 1 commit into
Conversation
Hide kernel pointer addresses from unprivileged /proc readers while leaving them visible to root. Low-risk hardening that does not change normal desktop behaviour; existing installs pick it up via migration without waiting for reboot. Fixes omacom#9194 Signed-off-by: fresh3nough <anonwurcod@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #9194.
Omarchy already ships performance/network sysctls in
etc/sysctl.d/99-omarchy-sysctl.conf. Arch defaults leavekernel.kptr_restrict=0, which exposes kernel addresses in/proc(e.g./proc/kallsyms) to unprivileged users and weakens KASLR against local exploits.Change
kernel.kptr_restrict=1inetc/sysctl.d/99-omarchy-sysctl.conf(root still sees pointers).1788139000.shapplies the drop-in at update time so existing boots do not wait for reboot.Test plan
kernel.kptr_restrict=1sudo sysctl -w kernel.kptr_restrict=1applies cleanly on GCP VM./test/shell.d/sysctl-kptr-restrict-test.shpasses