summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2018-09-21 12:58:16 +0200
committerMartin Borg <martin.borg@enea.com>2018-09-26 11:55:22 +0200
commita21738f7a6d419e740040726cb68d3444d51fde7 (patch)
treebe7bff25c1f0da6ccfd362412a4d157841e84a39
parent28e754d96d3aaef7e0661a2416bad4418f2e8d9e (diff)
downloadmeta-enea-bsp-x86-a21738f7a6d419e740040726cb68d3444d51fde7.tar.gz
linux-intel: Fix for CVE-2018-14617
Fix for both linux-intel and linux-intel-rt. References: https://github.com/nluedtke/linux_kernel_cves/blob/master/4.14/4.14_security.txt https://nvd.nist.gov/vuln/detail/CVE-2018-14617 Change-Id: Ideb3fe257a127d10b4468c210516edf69a4603ca Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-rw-r--r--recipes-kernel/linux/linux-intel-rt_4.14.bbappend1
-rw-r--r--recipes-kernel/linux/linux-intel/CVE-2018-14617.patch64
-rw-r--r--recipes-kernel/linux/linux-intel_4.14.bbappend1
3 files changed, 66 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel-rt_4.14.bbappend b/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
index 6c4061f..b8abb45 100644
--- a/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
+++ b/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
@@ -14,6 +14,7 @@ SRC_URI_append = " git://git@git.enea.com/linux/enea-kernel-cache.git;protocol=s
14 file://CVE-2018-9363.patch \ 14 file://CVE-2018-9363.patch \
15 file://CVE-2018-16658.patch \ 15 file://CVE-2018-16658.patch \
16 file://CVE-2018-14609.patch \ 16 file://CVE-2018-14609.patch \
17 file://CVE-2018-14617.patch \
17 " 18 "
18 19
19# Debug tools support 20# Debug tools support
diff --git a/recipes-kernel/linux/linux-intel/CVE-2018-14617.patch b/recipes-kernel/linux/linux-intel/CVE-2018-14617.patch
new file mode 100644
index 0000000..8801932
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/CVE-2018-14617.patch
@@ -0,0 +1,64 @@
1From 68e787c3c80059c776d1d7afb20f5eb9f20237a5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ernesto=20A=2E=20Fern=C3=A1ndez?=
3 <ernesto.mnd.fernandez@gmail.com>
4Date: Thu, 23 Aug 2018 17:00:25 -0700
5Subject: [PATCH] hfsplus: fix NULL dereference in hfsplus_lookup()
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10[ Upstream commit a7ec7a4193a2eb3b5341243fc0b621c1ac9e4ec4 ]
11
12An HFS+ filesystem can be mounted read-only without having a metadata
13directory, which is needed to support hardlinks. But if the catalog
14data is corrupted, a directory lookup may still find dentries claiming
15to be hardlinks.
16
17hfsplus_lookup() does check that ->hidden_dir is not NULL in such a
18situation, but mistakenly does so after dereferencing it for the first
19time. Reorder this check to prevent a crash.
20
21This happens when looking up corrupted catalog data (dentry) on a
22filesystem with no metadata directory (this could only ever happen on a
23read-only mount). Wen Xu sent the replication steps in detail to the
24fsdevel list: https://bugzilla.kernel.org/show_bug.cgi?id=200297
25
26CVE: CVE-2018-14617
27Upstream-Status: Backport
28
29Link: http://lkml.kernel.org/r/20180712215344.q44dyrhymm4ajkao@eaf
30Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
31Reported-by: Wen Xu <wen.xu@gatech.edu>
32Cc: Viacheslav Dubeyko <slava@dubeyko.com>
33Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
34Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
35Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
36Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
38---
39 fs/hfsplus/dir.c | 4 ++--
40 1 file changed, 2 insertions(+), 2 deletions(-)
41
42diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
43index e8120a2..1a44c46 100644
44--- a/fs/hfsplus/dir.c
45+++ b/fs/hfsplus/dir.c
46@@ -78,13 +78,13 @@ static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry,
47 cpu_to_be32(HFSP_HARDLINK_TYPE) &&
48 entry.file.user_info.fdCreator ==
49 cpu_to_be32(HFSP_HFSPLUS_CREATOR) &&
50+ HFSPLUS_SB(sb)->hidden_dir &&
51 (entry.file.create_date ==
52 HFSPLUS_I(HFSPLUS_SB(sb)->hidden_dir)->
53 create_date ||
54 entry.file.create_date ==
55 HFSPLUS_I(d_inode(sb->s_root))->
56- create_date) &&
57- HFSPLUS_SB(sb)->hidden_dir) {
58+ create_date)) {
59 struct qstr str;
60 char name[32];
61
62--
631.9.1
64
diff --git a/recipes-kernel/linux/linux-intel_4.14.bbappend b/recipes-kernel/linux/linux-intel_4.14.bbappend
index 1fa63e0..efe54af 100644
--- a/recipes-kernel/linux/linux-intel_4.14.bbappend
+++ b/recipes-kernel/linux/linux-intel_4.14.bbappend
@@ -8,6 +8,7 @@ KENEABRANCH = "intel-4.14"
8SRC_URI_append = " git://git@git.enea.com/linux/enea-kernel-cache.git;protocol=ssh;type=kmeta;name=metaenea;branch=${KENEABRANCH};destsuffix=enea-kernel-meta \ 8SRC_URI_append = " git://git@git.enea.com/linux/enea-kernel-cache.git;protocol=ssh;type=kmeta;name=metaenea;branch=${KENEABRANCH};destsuffix=enea-kernel-meta \
9 file://CVE-2018-16658.patch \ 9 file://CVE-2018-16658.patch \
10 file://CVE-2018-14609.patch \ 10 file://CVE-2018-14609.patch \
11 file://CVE-2018-14617.patch \
11 " 12 "
12 13
13KERNEL_FEATURES_append = " features/x2apic/x2apic.scc" 14KERNEL_FEATURES_append = " features/x2apic/x2apic.scc"