Repository navigation
fix(zone): keep the kernel's mmap and brk randomization defaults - #294
Merged
Merged
Conversation
The zone configs pinned CONFIG_ARCH_MMAP_RND_BITS and its compat counterpart to the architecture minimums, and with CONFIG_EXPERT=y those values override the kernel's default of the maximum. x86_64 zones also set CONFIG_COMPAT_BRK=y, which boots with randomize_va_space=1 and turns brk randomization off. Drop the pinned values and COMPAT_BRK, as the host configs already do.
kdaula
marked this pull request as ready for review
November 4, 2026 01:52
kdaula
requested review from
alexandermerritt,
azenla,
bleggett,
kaniini and
tycho
as code owners
November 4, 2026 01:52
Contributor
|
while this is an improvement, we should want to default zones to using the maximum amount of entropy to make ASLR more effective as a mitigation. |
Contributor
|
oh it does precisely that, but the PR description wasn't clear to me at 7:50am |
kaniini
approved these changes
Nov 4, 2026
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.
Zone kernels run with the minimum mmap entropy, 28 bits on x86_64 and 18 on arm64, and x86_64 zones have no brk randomization at all. Host kernels get the maximum.
Edera's kernel makes the maximum mmap entropy the default, but zone.config still pins CONFIG_ARCH_MMAP_RND_BITS and CONFIG_ARCH_MMAP_RND_COMPAT_BITS to the old minimums, and CONFIG_EXPERT=y makes those pinned values win. The x86_64 zone also sets CONFIG_COMPAT_BRK=y, which boots with randomize_va_space=1 and leaves brk unrandomized. This drops the pinned values and COMPAT_BRK, matching the host configs. Configuring the x86_64 zone kernel with this change gives 32 mmap bits, 16 compat bits and COMPAT_BRK off.
COR-196