Skip to content

Commit 61b2c40

Browse files
rlmengechristopherco
authored andcommitted
security(kernel): harden memory mapping and IOMMU defaults
Set CONFIG_LSM_MMAP_MIN_ADDR=65536 on both arches (was 0) and enable CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT on aarch64. Both were set in AZL 3.0. Bump azl_pkgrelease to 10 for the hardening changes. - LSM_MMAP_MIN_ADDR=65536: prevents userspace from mapping low virtual addresses, blocking NULL-pointer dereference exploits. AZL 3.0 x86_64 had 65536, aarch64 had 4096 — now consistent at 65536. Aligned with KSPP recommendations. - ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT: IOMMU denies DMA by default for devices not explicitly assigned, preventing DMA attacks from compromised devices. Aligned with KSPP recommendations.
1 parent 08fd920 commit 61b2c40

7 files changed

Lines changed: 9 additions & 9 deletions

File tree

base/comps/kernel/6.18-aarch64-azl.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11226,7 +11226,7 @@ CONFIG_IOMMU_SVA=y
1122611226
CONFIG_IOMMU_IOPF=y
1122711227
CONFIG_ARM_SMMU=y
1122811228
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
11229-
# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
11229+
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
1123011230
CONFIG_ARM_SMMU_MMU_500_CPRE_ERRATA=y
1123111231
CONFIG_ARM_SMMU_QCOM=y
1123211232
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
@@ -13410,7 +13410,7 @@ CONFIG_SECURITY_NETWORK=y
1341013410
CONFIG_SECURITY_INFINIBAND=y
1341113411
CONFIG_SECURITY_NETWORK_XFRM=y
1341213412
CONFIG_SECURITY_PATH=y
13413-
CONFIG_LSM_MMAP_MIN_ADDR=0
13413+
CONFIG_LSM_MMAP_MIN_ADDR=65536
1341413414
# CONFIG_STATIC_USERMODEHELPER is not set
1341513415
CONFIG_SECURITY_SELINUX=y
1341613416
CONFIG_SECURITY_SELINUX_BOOTPARAM=y

base/comps/kernel/6.18-x86_64-azl.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7536,7 +7536,7 @@ CONFIG_SECURITY_INFINIBAND=y
75367536
CONFIG_SECURITY_NETWORK_XFRM=y
75377537
CONFIG_SECURITY_PATH=y
75387538
CONFIG_INTEL_TXT=y
7539-
CONFIG_LSM_MMAP_MIN_ADDR=0
7539+
CONFIG_LSM_MMAP_MIN_ADDR=65536
75407540
# CONFIG_STATIC_USERMODEHELPER is not set
75417541
CONFIG_SECURITY_SELINUX=y
75427542
CONFIG_SECURITY_SELINUX_BOOTPARAM=y

base/comps/kernel/kernel.comp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ without = [
1414

1515
[components.kernel.build.defines]
1616
# RPM release number for the Azure Linux kernel package
17-
azl_pkgrelease = "12"
17+
azl_pkgrelease = "13"
1818
# 4th version component from the AZL kernel source (6.18.5.1). Included in specrelease so it appears
1919
# in the RPM Release tag, uname -r, and /lib/modules/ path (e.g. 6.18.5-1.3.azl4.aarch64).
2020
kextraversion = "1"

locks/kernel.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
version = 1
33
import-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
44
upstream-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
5-
input-fingerprint = 'sha256:43678a80bce5e882c175c342ab03a9576d63a1a20e23f30ef6960d2bc32d0725'
5+
input-fingerprint = 'sha256:a54d85918f6e592a07c3fcbb62b3f44a88f96860145c39edd9183352b952b112'
66
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'

specs/k/kernel/6.18-aarch64-azl.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11226,7 +11226,7 @@ CONFIG_IOMMU_SVA=y
1122611226
CONFIG_IOMMU_IOPF=y
1122711227
CONFIG_ARM_SMMU=y
1122811228
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
11229-
# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
11229+
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
1123011230
CONFIG_ARM_SMMU_MMU_500_CPRE_ERRATA=y
1123111231
CONFIG_ARM_SMMU_QCOM=y
1123211232
# CONFIG_ARM_SMMU_QCOM_DEBUG is not set
@@ -13410,7 +13410,7 @@ CONFIG_SECURITY_NETWORK=y
1341013410
CONFIG_SECURITY_INFINIBAND=y
1341113411
CONFIG_SECURITY_NETWORK_XFRM=y
1341213412
CONFIG_SECURITY_PATH=y
13413-
CONFIG_LSM_MMAP_MIN_ADDR=0
13413+
CONFIG_LSM_MMAP_MIN_ADDR=65536
1341413414
# CONFIG_STATIC_USERMODEHELPER is not set
1341513415
CONFIG_SECURITY_SELINUX=y
1341613416
CONFIG_SECURITY_SELINUX_BOOTPARAM=y

specs/k/kernel/6.18-x86_64-azl.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7536,7 +7536,7 @@ CONFIG_SECURITY_INFINIBAND=y
75367536
CONFIG_SECURITY_NETWORK_XFRM=y
75377537
CONFIG_SECURITY_PATH=y
75387538
CONFIG_INTEL_TXT=y
7539-
CONFIG_LSM_MMAP_MIN_ADDR=0
7539+
CONFIG_LSM_MMAP_MIN_ADDR=65536
75407540
# CONFIG_STATIC_USERMODEHELPER is not set
75417541
CONFIG_SECURITY_SELINUX=y
75427542
CONFIG_SECURITY_SELINUX_BOOTPARAM=y

specs/k/kernel/kernel.azl.macros

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Do not edit manually; changes will be overwritten.
33
%_without_debug 1
44
%_without_selftests 1
5-
%azl_pkgrelease 12
5+
%azl_pkgrelease 13
66
%azurelinux_version 3
77
%kextraversion 1

0 commit comments

Comments
 (0)