-
Notifications
You must be signed in to change notification settings - Fork 619
security(kernel): enable hardening config defaults #16714
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
base: tomls/base/main
Are you sure you want to change the base?
Changes from all commits
391c8b2
58d0e57
83e91bf
c2f4107
bdfb314
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1179,7 +1179,7 @@ CONFIG_ZSMALLOC_CHAIN_SIZE=8 | |
| CONFIG_SLUB=y | ||
| CONFIG_KVFREE_RCU_BATCHED=y | ||
| # CONFIG_SLUB_TINY is not set | ||
| CONFIG_SLAB_MERGE_DEFAULT=y | ||
| # CONFIG_SLAB_MERGE_DEFAULT is not set | ||
| CONFIG_SLAB_FREELIST_RANDOM=y | ||
| CONFIG_SLAB_FREELIST_HARDENED=y | ||
| CONFIG_SLAB_BUCKETS=y | ||
|
|
@@ -11226,7 +11226,7 @@ CONFIG_IOMMU_SVA=y | |
| CONFIG_IOMMU_IOPF=y | ||
| CONFIG_ARM_SMMU=y | ||
| # CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set | ||
| # CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set | ||
| CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y | ||
| CONFIG_ARM_SMMU_MMU_500_CPRE_ERRATA=y | ||
| CONFIG_ARM_SMMU_QCOM=y | ||
| # CONFIG_ARM_SMMU_QCOM_DEBUG is not set | ||
|
|
@@ -13538,8 +13538,8 @@ CONFIG_HARDENED_USERCOPY_DEFAULT_ON=y | |
| # | ||
| # Hardening of kernel data structures | ||
| # | ||
| # CONFIG_LIST_HARDENED is not set | ||
| # CONFIG_BUG_ON_DATA_CORRUPTION is not set | ||
| CONFIG_LIST_HARDENED=y | ||
| CONFIG_BUG_ON_DATA_CORRUPTION=y | ||
| # end of Hardening of kernel data structures | ||
|
|
||
| # CONFIG_CFI is not set | ||
|
|
@@ -14307,10 +14307,10 @@ CONFIG_STACKTRACE=y | |
| # | ||
| # Debug kernel data structures | ||
| # | ||
| # CONFIG_DEBUG_LIST is not set | ||
| # CONFIG_DEBUG_PLIST is not set | ||
| # CONFIG_DEBUG_SG is not set | ||
| # CONFIG_DEBUG_NOTIFIERS is not set | ||
| CONFIG_DEBUG_LIST=y | ||
| CONFIG_DEBUG_PLIST=y | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: commit message indicates DEBUG_LIST, DEBUG_PLIST, DEBUG_SG, DEBUG_NOTIFIERS are enabled due to LIST_HARDENED and BUG_ON_DATA_CORRUPTION, but that doesn't look accurate from looking at the Kconfig selectors upstream:
Can you clarify how these 4 DEBUG_* are being force-enabled? Do they help with enabling these other hardening configurations? Note: I also do worry about performance penalty with the DEBUG options. But we should iterate on this with perf data to understand how much we're trading off for what we gain.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack. We for sure want |
||
| CONFIG_DEBUG_SG=y | ||
| CONFIG_DEBUG_NOTIFIERS=y | ||
| # CONFIG_DEBUG_CLOSURES is not set | ||
| # CONFIG_DEBUG_MAPLE_TREE is not set | ||
| # end of Debug kernel data structures | ||
|
|
||
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.
PR description calls out setting an LSM mmap floor (
CONFIG_LSM_MMAP_MIN_ADDR=65536), but the aarch64 config still leavesCONFIG_LSM_MMAP_MIN_ADDR=0(see file contents around line ~13413). If the hardening is intended for all arches, this should be updated in the aarch64 config as well; if it’s intentionally x86_64-only, please clarify that in the PR description/commit message.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.
This is a good callout. 3.0 uses
CONFIG_LSM_MMAP_MIN_ADDR=4096for arm64