Merge pull request #2518 from bgilbert/kernel-4.10.9

sys-kernel/coreos-*: bump to v4.10.9; enable NVMe over RDMA
This commit is contained in:
Benjamin Gilbert 2017-04-11 21:38:05 -07:00 committed by GitHub
commit 725ac5eabb
23 changed files with 40 additions and 126 deletions

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
COREOS_SOURCE_REVISION="-r1"
COREOS_SOURCE_REVISION=""
inherit coreos-kernel
DESCRIPTION="CoreOS Linux kernel"

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
COREOS_SOURCE_REVISION="-r1"
COREOS_SOURCE_REVISION=""
inherit coreos-kernel savedconfig
DESCRIPTION="CoreOS Linux kernel modules"

View File

@ -419,6 +419,10 @@ CONFIG_XEN_BLKDEV_BACKEND=m
CONFIG_VIRTIO_BLK=m
CONFIG_BLK_DEV_RBD=m
CONFIG_BLK_DEV_NVME=m
CONFIG_NVME_RDMA=m
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_RDMA=m
CONFIG_ENCLOSURE_SERVICES=m
CONFIG_HP_ILO=m
CONFIG_BLK_DEV_SR=m

View File

@ -1,2 +1,2 @@
DIST linux-4.10.tar.xz 94231404 SHA256 3c95d9f049bd085e5c346d2c77f063b8425f191460fcd3ae9fe7e94e0477dc4b SHA512 c3690125a8402df638095bd98a613fcf1a257b81de7611c84711d315cd11e2634ab4636302b3742aedf1e3ba9ce0fea53fe8c7d48e37865d8ee5db3565220d90 WHIRLPOOL 86d021bae2dbfc4ef80c22d9e886bed4fbd9476473a2851d7beaf8ed0c7f7fbc1fa0da230eb9e763eb231b7c164c17b2a73fd336ab233543f57be280d6173738
DIST patch-4.10.4.xz 106756 SHA256 68e935fbe1c3faaf186824a44b79a26f1ab85f04a1dade2e5bce5f8c2941624d SHA512 a0631f3ee744984d9388d8e9ad98e7238d9305d94082db784b28080d9bae4f2c0cca84e4510ccfa562f5246ce1ed98c78cf41edc5a3b3bcc862ed62a1f2c8516 WHIRLPOOL a610e5d6e39fd07e8bf4e0056af7450cc6d0820c26e09052e8943ebdb8bfcdf89342f404ddc07ff2fddcada4504483ecd0688fb405549f189d6c387b3b553b48
DIST patch-4.10.9.xz 205384 SHA256 9a00b962a5e30d61a0d488fc28f4a20b79c8c5c28fa21ee89c440c025c6c7c21 SHA512 867cdcf1e6ceee58dec7eb913e119dcaa75255cef1ad2dd9eb0eead6a918a202e3b6656770422d547a7758236a8589c70d49fa4045de867b77a04480f97c242d WHIRLPOOL 694eacdce67dc46f21fc5d1738e14c13e9d62e564d5f9e761a46e0c7cfba57fdf052286c625d246542deba146f1fb8cdba8987b721705cc961bb1cf990e524ce

View File

@ -36,6 +36,4 @@ UNIPATCH_LIST="
${PATCH_DIR}/z0014-kbuild-derive-relative-path-for-KBUILD_SRC-from-CURD.patch \
${PATCH_DIR}/z0015-Add-arm64-coreos-verity-hash.patch \
${PATCH_DIR}/z0016-selinux-allow-context-mounts-on-tmpfs-ramfs-devpts-w.patch \
${PATCH_DIR}/z0017-xfrm_user-validate-XFRM_MSG_NEWAE-XFRMA_REPLAY_ESN_V.patch \
${PATCH_DIR}/z0018-xfrm_user-validate-XFRM_MSG_NEWAE-incoming-ESN-size-.patch \
"

View File

@ -1,7 +1,7 @@
From b2abd80b69de4ea94e7d003a13160df562392c3a Mon Sep 17 00:00:00 2001
From 25483d5582a84e12b9549c2723bbf6ca20b380cf Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Aug 2013 17:58:15 -0400
Subject: [PATCH 01/18] Add secure_modules() call
Subject: [PATCH 01/16] Add secure_modules() call
Provide a single call to allow kernel code to determine whether the system
has been configured to either disable module loading entirely or to load

View File

@ -1,7 +1,7 @@
From ea565b4c32c1078914c2dd9903d2aebf67bab0ee Mon Sep 17 00:00:00 2001
From 1c7d420a3c2fd484acf2f57f40a358a62d205be7 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Thu, 8 Mar 2012 10:10:38 -0500
Subject: [PATCH 02/18] PCI: Lock down BAR access when module security is
Subject: [PATCH 02/16] PCI: Lock down BAR access when module security is
enabled
Any hardware that can potentially generate DMA has to be locked down from

View File

@ -1,7 +1,7 @@
From 247ab2f0f22a52cc9b87a9e6dbd3c523cb02fd7c Mon Sep 17 00:00:00 2001
From 0809979ec779573c6519357aaa66b196134bd5fd Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Thu, 8 Mar 2012 10:35:59 -0500
Subject: [PATCH 03/18] x86: Lock down IO port access when module security is
Subject: [PATCH 03/16] x86: Lock down IO port access when module security is
enabled
IO port access would permit users to gain access to PCI configuration

View File

@ -1,7 +1,7 @@
From 5eeb29907f925210621bd752aeca7f4826456ab3 Mon Sep 17 00:00:00 2001
From 30c3700c562f87e1dfdef91062c32762c254e434 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 08:39:37 -0500
Subject: [PATCH 04/18] ACPI: Limit access to custom_method
Subject: [PATCH 04/16] ACPI: Limit access to custom_method
custom_method effectively allows arbitrary access to system memory, making
it possible for an attacker to circumvent restrictions on module loading.

View File

@ -1,7 +1,7 @@
From 30c3afa1c37c6c0adbd7cb4766d96ff2f8a3c3d2 Mon Sep 17 00:00:00 2001
From e1c6be9b1dc28d543f2f01540ecaf6aa892d0e50 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 08:46:50 -0500
Subject: [PATCH 05/18] asus-wmi: Restrict debugfs interface when module
Subject: [PATCH 05/16] asus-wmi: Restrict debugfs interface when module
loading is restricted
We have no way of validating what all of the Asus WMI methods do on a

View File

@ -1,7 +1,7 @@
From c8a67b57068f99a212023507ffeea874ba658b4e Mon Sep 17 00:00:00 2001
From 0430e19e6a0f592724edf0a72627b8ded7d39942 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 09:28:15 -0500
Subject: [PATCH 06/18] Restrict /dev/mem and /dev/kmem when module loading is
Subject: [PATCH 06/16] Restrict /dev/mem and /dev/kmem when module loading is
restricted
Allowing users to write to address space makes it possible for the kernel

View File

@ -1,7 +1,7 @@
From 5359936a69b86d5fc0893eeac402f39db3d1364a Mon Sep 17 00:00:00 2001
From e5ad175adb56e386dc53e82084116a3f086006c1 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@redhat.com>
Date: Mon, 25 Jun 2012 19:57:30 -0400
Subject: [PATCH 07/18] acpi: Ignore acpi_rsdp kernel parameter when module
Subject: [PATCH 07/16] acpi: Ignore acpi_rsdp kernel parameter when module
loading is restricted
This option allows userspace to pass the RSDP address to the kernel, which

View File

@ -1,7 +1,7 @@
From f7278e3a4ee1e978444966382f09fd59e8a760bd Mon Sep 17 00:00:00 2001
From 4fb1128fbac6e54b54e55870b93ffa97d354eaf2 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Thu, 19 Nov 2015 18:55:53 -0800
Subject: [PATCH 08/18] kexec: Disable at runtime if the kernel enforces module
Subject: [PATCH 08/16] kexec: Disable at runtime if the kernel enforces module
loading restrictions
kexec permits the loading and execution of arbitrary code in ring 0, which

View File

@ -1,7 +1,7 @@
From e447d16529ac075611efff2a5b08a965b89f178a Mon Sep 17 00:00:00 2001
From 9683bd9d4a6a9603a98e54dcf6849ce1b09fd09d Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 8 Feb 2013 11:12:13 -0800
Subject: [PATCH 09/18] x86: Restrict MSR access when module loading is
Subject: [PATCH 09/16] x86: Restrict MSR access when module loading is
restricted
Writing to MSRs should not be allowed if module loading is restricted,

View File

@ -1,7 +1,7 @@
From 82c969da1e430f362b44bae864bf2da8e2d3b503 Mon Sep 17 00:00:00 2001
From 5ad82fbaf16c1fe56e12d18373b1477d3518b8e7 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Aug 2013 18:36:30 -0400
Subject: [PATCH 10/18] Add option to automatically enforce module signatures
Subject: [PATCH 10/16] Add option to automatically enforce module signatures
when in Secure Boot mode
UEFI Secure Boot provides a mechanism for ensuring that the firmware will

View File

@ -1,7 +1,7 @@
From 91d4b04458c069b34b0ac00b0810ea430c3af757 Mon Sep 17 00:00:00 2001
From 24a8299ab03c6fdfffb0e75279ea9ba3fe66d62e Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Tue, 27 Aug 2013 13:28:43 -0400
Subject: [PATCH 11/18] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI
Subject: [PATCH 11/16] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI
The functionality of the config option is dependent upon the platform being
UEFI based. Reflect this in the config deps.

View File

@ -1,7 +1,7 @@
From fe4593724b038638a71e277cb2df62750a069af8 Mon Sep 17 00:00:00 2001
From d7f4afdbee0a79c7c49723b434a52d70ecfed470 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Tue, 27 Aug 2013 13:33:03 -0400
Subject: [PATCH 12/18] efi: Add EFI_SECURE_BOOT bit
Subject: [PATCH 12/16] efi: Add EFI_SECURE_BOOT bit
UEFI machines can be booted in Secure Boot mode. Add a EFI_SECURE_BOOT bit
for use with efi_enabled.

View File

@ -1,7 +1,7 @@
From 69d98ac51018ec84515a087873082f139072fc94 Mon Sep 17 00:00:00 2001
From 5858e98a315cd78c59c744acbaed63b6cadf39b2 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Fri, 20 Jun 2014 08:53:24 -0400
Subject: [PATCH 13/18] hibernate: Disable in a signed modules environment
Subject: [PATCH 13/16] hibernate: Disable in a signed modules environment
There is currently no way to verify the resume image when returning
from hibernate. This might compromise the signed modules trust model,

View File

@ -1,7 +1,7 @@
From ad97f1904d0ba6ce252a0af5c1601eb376e004d1 Mon Sep 17 00:00:00 2001
From 0770bc355f017765e532d6f096a5521c289ef83f Mon Sep 17 00:00:00 2001
From: Vito Caputo <vito.caputo@coreos.com>
Date: Wed, 25 Nov 2015 02:59:45 -0800
Subject: [PATCH 14/18] kbuild: derive relative path for KBUILD_SRC from CURDIR
Subject: [PATCH 14/16] kbuild: derive relative path for KBUILD_SRC from CURDIR
This enables relocating source and build trees to different roots,
provided they stay reachable relative to one another. Useful for
@ -12,7 +12,7 @@ by some undesirable path component.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 8df819e..65abe81 100644
index 4ebd511..16c4138 100644
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,8 @@ $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make

View File

@ -1,7 +1,7 @@
From 3014e6df9afba9273b942cbb85c912ccb58bcbd3 Mon Sep 17 00:00:00 2001
From 2ce5844c758046656609505b4d3e55020e6846c0 Mon Sep 17 00:00:00 2001
From: Geoff Levand <geoff@infradead.org>
Date: Fri, 11 Nov 2016 17:28:52 -0800
Subject: [PATCH 15/18] Add arm64 coreos verity hash
Subject: [PATCH 15/16] Add arm64 coreos verity hash
Signed-off-by: Geoff Levand <geoff@infradead.org>
---

View File

@ -1,7 +1,7 @@
From 41afe48e7ce028e30d5da92c574a4663924281fd Mon Sep 17 00:00:00 2001
From f744aa4454446d8b066700eb79819170586df9cd Mon Sep 17 00:00:00 2001
From: Stephen Smalley <sds@tycho.nsa.gov>
Date: Mon, 9 Jan 2017 10:07:31 -0500
Subject: [PATCH 16/18] selinux: allow context mounts on tmpfs, ramfs, devpts
Subject: [PATCH 16/16] selinux: allow context mounts on tmpfs, ramfs, devpts
within user namespaces
commit aad82892af261b9903cc11c55be3ecf5f0b0b4f8 ("selinux: Add support for

View File

@ -1,49 +0,0 @@
From f541c301cbca8f4b1f0ebd31ddfa2e2b00557fc8 Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <apw@canonical.com>
Date: Wed, 22 Mar 2017 07:29:31 +0000
Subject: [PATCH 17/18] xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL
replay_window
When a new xfrm state is created during an XFRM_MSG_NEWSA call we
validate the user supplied replay_esn to ensure that the size is valid
and to ensure that the replay_window size is within the allocated
buffer. However later it is possible to update this replay_esn via a
XFRM_MSG_NEWAE call. There we again validate the size of the supplied
buffer matches the existing state and if so inject the contents. We do
not at this point check that the replay_window is within the allocated
memory. This leads to out-of-bounds reads and writes triggered by
netlink packets. This leads to memory corruption and the potential for
priviledge escalation.
We already attempt to validate the incoming replay information in
xfrm_new_ae() via xfrm_replay_verify_len(). This confirms that the user
is not trying to change the size of the replay state buffer which
includes the replay_esn. It however does not check the replay_window
remains within that buffer. Add validation of the contained
replay_window.
CVE-2017-7184
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
net/xfrm/xfrm_user.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 9705c27..cdf887f 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -415,6 +415,9 @@ static inline int xfrm_replay_verify_len(struct xfrm_replay_state_esn *replay_es
if (nla_len(rp) < ulen || xfrm_replay_state_esn_len(replay_esn) != ulen)
return -EINVAL;
+ if (up->replay_window > up->bmp_len * sizeof(__u32) * 8)
+ return -EINVAL;
+
return 0;
}
--
2.9.3

View File

@ -1,39 +0,0 @@
From e8b4c221152ffb698218514866f0c0092972b2ce Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <apw@canonical.com>
Date: Thu, 23 Mar 2017 07:45:44 +0000
Subject: [PATCH 18/18] xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size
harder
Kees Cook has pointed out that xfrm_replay_state_esn_len() is subject to
wrapping issues. To ensure we are correctly ensuring that the two ESN
structures are the same size compare both the overall size as reported
by xfrm_replay_state_esn_len() and the internal length are the same.
CVE-2017-7184
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
net/xfrm/xfrm_user.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index cdf887f..40a8aa3 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -412,7 +412,11 @@ static inline int xfrm_replay_verify_len(struct xfrm_replay_state_esn *replay_es
up = nla_data(rp);
ulen = xfrm_replay_state_esn_len(up);
- if (nla_len(rp) < ulen || xfrm_replay_state_esn_len(replay_esn) != ulen)
+ /* Check the overall length and the internal bitmap length to avoid
+ * potential overflow. */
+ if (nla_len(rp) < ulen ||
+ xfrm_replay_state_esn_len(replay_esn) != ulen ||
+ replay_esn->bmp_len != up->bmp_len)
return -EINVAL;
if (up->replay_window > up->bmp_len * sizeof(__u32) * 8)
--
2.9.3