-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
linux_*_hardened: use linux-hardened patch set #84522
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
10dd3f3
graphene-hardened-malloc: enable on aarch64-linux
emilazy 3d01e80
linux: explicitly enable SYSVIPC
emilazy 0d4f35e
linux_*_hardened: use linux-hardened patch set
emilazy 7d5352d
linux_*_hardened: don't set X86_X32
emilazy 3d4c8ae
linux_*_hardened: don't set VMAP_STACK
emilazy 8efe83c
linux_*_hardened: don't set DEFAULT_MMAP_MIN_ADDR
emilazy 8c68055
linux_*_hardened: don't set MODIFY_LDT_SYSCALL
emilazy 130f681
linux_*_hardened: don't set RANDOMIZE_{BASE,MEMORY}
emilazy db6b327
linux_*_hardened: don't set LEGACY_VSYSCALL_NONE
emilazy 33b94e5
linux_*_hardened: don't set BUG_ON_DATA_CORRUPTION
emilazy 303bb60
linux_*_hardened: don't set DEBUG_WX
emilazy 0611462
linux_*_hardened: don't set {,IO_}STRICT_DEVMEM
emilazy 3eeb524
linux_*_hardened: don't set DEBUG_LIST
emilazy 4fb796e
linux_*_hardened: don't set HARDENED_USERCOPY_FALLBACK
emilazy 0d5f169
linux_*_hardened: don't set SLAB_FREELIST_{RANDOM,HARDENED}
emilazy ed89b5b
linux_*_hardened: don't set PANIC_ON_OOPS
emilazy 7fdfe53
linux_*_hardened: don't set FORTIFY_SOURCE
emilazy 3b32cd2
nixos/hardened: don't set slab_nomerge
emilazy cf1bce6
nixos/hardened: don't set vsyscall=none
emilazy 9da578a
nixos/hardened: don't set kernel.dmesg_restrict
emilazy 71bbd87
nixos/hardened: don't set kernel.unprivileged_bpf_disabled
emilazy af4f57b
nixos/hardened: don't set net.core.bpf_jit_harden
emilazy 46d12cc
nixos/hardened: don't set vm.mmap_rnd{,_compat}_bits
emilazy cc28d51
nixos/hardened: don't set vm.mmap_min_addr
emilazy 84f258b
nixos/hardened: don't set vm.unprivileged_userfaultfd
emilazy ad9bfe2
nixos/hardened: enable user namespaces for root
emilazy b0d5032
nixos/hardened: add emily to maintainers
emilazy fe031d0
nixos/tests/hardened: add latestKernel argument
emilazy e133e39
nixos/release-{small,combined}: add latestKernel.login
emilazy 2e31fb4
nixos/release-combined: add {,latestKernel.}hardened
emilazy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Maybe one should mention in
meta.doc = ./hardened.xml;
that in order to use Firefox with this profile, one has to reset the memory allocator:#73763 (comment)
cc @Flakebi
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.
Agreed; not sure it belongs in this PR which is entirely kernel changes and already huge, though, as Firefox is broken with a custom allocator set regardless of what kernel you use. I think the correct solution to make Firefox work is to implement a library with replace-malloc hooks; I've been idly planning to do that since the scudo change got merged but I'd be very happy for someone to preempt me! It'd also be nice to have support for setting up Firefox's setuid sandbox like Chromium's if we're disabling unprivileged userns.
FWIW, from playing around with things I think the
"graphene-hardened"
allocator might have better compatibility for some programs than scudo (though it's a mixed bag – right now it flags up what looks like memory unsafety innix(1)
!), and it's what I was planning on targetting with the replace-malloc library, but ultimately I suspect that we're going to want a way to specifically exempt packages from the hardened allocator. With the current implementation that involves mount namespaces so you can hide/etc/ld-nix.so.preload
, which combined with the userns defaults means that the wrappers to do it will need to be setuid root :(Maybe we could patch the dynamic loader to ignore the preload file if there's a special marker in the ELF file or something.