summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2018-09-20 08:19:21 +0200
committerMartin Borg <martin.borg@enea.com>2018-09-21 14:42:03 +0200
commite862c3d668979a42caacee10847b39b5827a20fb (patch)
tree19f4ac5d26d9490146230116a859d4292677512b
parent3547448d2fd86248c11d256e4ae4f02adea67d47 (diff)
downloadmeta-enea-bsp-x86-e862c3d668979a42caacee10847b39b5827a20fb.tar.gz
linux-intel-rt: Fix for CVE-2018-13094
References: https://github.com/nluedtke/linux_kernel_cves/blob/master/4.14/4.14_security.txt https://nvd.nist.gov/vuln/detail/CVE-2018-13094 Change-Id: I781b5d3fad200e20d791e08f48737945ee2d4838 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-13094.patch51
2 files changed, 52 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 67e9661..53ed430 100644
--- a/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
+++ b/recipes-kernel/linux/linux-intel-rt_4.14.bbappend
@@ -9,6 +9,7 @@ SRC_URI_append = " git://git@git.enea.com/linux/enea-kernel-cache.git;protocol=s
9 file://CVE-2018-14734.patch \ 9 file://CVE-2018-14734.patch \
10 file://CVE-2018-12233.patch \ 10 file://CVE-2018-12233.patch \
11 file://CVE-2018-13093.patch \ 11 file://CVE-2018-13093.patch \
12 file://CVE-2018-13094.patch \
12 " 13 "
13 14
14# Debug tools support 15# Debug tools support
diff --git a/recipes-kernel/linux/linux-intel/CVE-2018-13094.patch b/recipes-kernel/linux/linux-intel/CVE-2018-13094.patch
new file mode 100644
index 0000000..b42ac8f
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/CVE-2018-13094.patch
@@ -0,0 +1,51 @@
1From 59f35b983e8aeb98188c6ef93f8eabc594f8f953 Mon Sep 17 00:00:00 2001
2From: Eric Sandeen <sandeen@sandeen.net>
3Date: Fri, 8 Jun 2018 09:53:49 -0700
4Subject: [PATCH] xfs: don't call xfs_da_shrink_inode with NULL bp
5
6commit bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a upstream.
7
8xfs_attr3_leaf_create may have errored out before instantiating a buffer,
9for example if the blkno is out of range. In that case there is no work
10to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops
11if we try.
12
13This also seems to fix a flaw where the original error from
14xfs_attr3_leaf_create gets overwritten in the cleanup case, and it
15removes a pointless assignment to bp which isn't used after this.
16
17CVE: CVE-2018-13094
18Upstream-Status: Backport
19
20Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199969
21Reported-by: Xu, Wen <wen.xu@gatech.edu>
22Tested-by: Xu, Wen <wen.xu@gatech.edu>
23Signed-off-by: Eric Sandeen <sandeen@redhat.com>
24Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
25Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
26Cc: Eduardo Valentin <eduval@amazon.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
29---
30 fs/xfs/libxfs/xfs_attr_leaf.c | 5 ++---
31 1 file changed, 2 insertions(+), 3 deletions(-)
32
33diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
34index 5c16db8..40e53a4 100644
35--- a/fs/xfs/libxfs/xfs_attr_leaf.c
36+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
37@@ -785,9 +785,8 @@ STATIC void xfs_attr3_leaf_moveents(struct xfs_da_args *args,
38 ASSERT(blkno == 0);
39 error = xfs_attr3_leaf_create(args, blkno, &bp);
40 if (error) {
41- error = xfs_da_shrink_inode(args, 0, bp);
42- bp = NULL;
43- if (error)
44+ /* xfs_attr3_leaf_create may not have instantiated a block */
45+ if (bp && (xfs_da_shrink_inode(args, 0, bp) != 0))
46 goto out;
47 xfs_idata_realloc(dp, size, XFS_ATTR_FORK); /* try to put */
48 memcpy(ifp->if_u1.if_data, tmpbuffer, size); /* it back */
49--
501.9.1
51