Browse code

Kernels: Fix for CVE-2018-10322

A Denial of Service vulnerability was found in XFS file system
in Kernel and the fix for this vulnerability has been
backported to kernel version 4.9.111

Change-Id: I23af547acc1186f276a0323567518f3e2db7c83f
Signed-off-by: srinidhira0 <srinidhir@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5366
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>

srinidhira0 authored on 2018/07/18 04:30:38
Showing 7 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,257 @@
0
+commit 71493b839e294065ba63bd6f8d07263f3afee8c6
1
+Author: Darrick J. Wong <darrick.wong@oracle.com>
2
+Date:   Mon Jan 8 10:51:04 2018 -0800
3
+
4
+    xfs: move inode fork verifiers to xfs_dinode_verify
5
+
6
+    Consolidate the fork size and format verifiers to xfs_dinode_verify so
7
+    that we can reject bad inodes earlier and in a single place.
8
+
9
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
10
+Reviewed-by: Dave Chinner <dchinner@redhat.com>
11
+
12
+[ Srinidhi Rao : Backported this change to 4.9 ]
13
+Signed-off-by: srinidhira0 <srinidhir@vmware.com>
14
+---
15
+ fs/xfs/libxfs/xfs_inode_buf.c  | 73 +++++++++++++++++++++++++++++++++--
16
+ fs/xfs/libxfs/xfs_inode_fork.c | 87 ------------------------------------------
17
+ 2 files changed, 70 insertions(+), 90 deletions(-)
18
+
19
+diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
20
+index 37ee7f0..0c1dd97 100644
21
+--- a/fs/xfs/libxfs/xfs_inode_buf.c
22
+@@ -390,12 +390,14 @@ xfs_dinode_verify(
23
+ 	uint16_t		mode;
24
+ 	uint16_t		flags;
25
+ 	uint64_t		flags2;
26
++	uint64_t                di_size;
27
+ 
28
+ 	if (dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC))
29
+ 		return false;
30
+ 
31
+ 	/* don't allow invalid i_size */
32
+-	if (be64_to_cpu(dip->di_size) & (1ULL << 63))
33
++        di_size = be64_to_cpu(dip->di_size);
34
++        if (di_size & (1ULL << 63))
35
+ 		return false;
36
+ 
37
+ 	mode = be16_to_cpu(dip->di_mode);
38
+@@ -403,9 +405,71 @@ xfs_dinode_verify(
39
+ 		return false;
40
+ 
41
+ 	/* No zero-length symlinks/dirs. */
42
+-	if ((S_ISLNK(mode) || S_ISDIR(mode)) && dip->di_size == 0)
43
++	if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0)
44
+ 		return false;
45
+ 
46
++        /* Fork checks carried over from xfs_iformat_fork */
47
++        if (mode &&
48
++                be32_to_cpu(dip->di_nextents) + be16_to_cpu(dip->di_anextents) >
49
++                        be64_to_cpu(dip->di_nblocks))
50
++                return false;
51
++
52
++        if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize)
53
++                return false;
54
++
55
++        flags = be16_to_cpu(dip->di_flags);
56
++
57
++        if (mode && (flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp)
58
++                return false;
59
++
60
++        /* Do we have appropriate data fork formats for the mode? */
61
++        switch (mode & S_IFMT) {
62
++        case S_IFIFO:
63
++        case S_IFCHR:
64
++        case S_IFBLK:
65
++        case S_IFSOCK:
66
++                if (dip->di_format != XFS_DINODE_FMT_DEV)
67
++                        return false;
68
++                break;
69
++        case S_IFREG:
70
++        case S_IFLNK:
71
++        case S_IFDIR:
72
++                switch (dip->di_format) {
73
++                case XFS_DINODE_FMT_LOCAL:
74
++                        /*
75
++                         * no local regular files yet
76
++                         */
77
++                        if (S_ISREG(mode))
78
++                                return false;
79
++                        if (di_size > XFS_DFORK_DSIZE(dip, mp))
80
++                                return false;
81
++                /* fall through */
82
++                case XFS_DINODE_FMT_EXTENTS:
83
++                case XFS_DINODE_FMT_BTREE:
84
++                        break;
85
++                default:
86
++                        return false;
87
++                }
88
++                break;
89
++        case 0:
90
++                /* Uninitialized inode ok. */
91
++                break;
92
++        default:
93
++                return false;
94
++        }
95
++
96
++        if (XFS_DFORK_Q(dip)) {
97
++                switch (dip->di_aformat) {
98
++                case XFS_DINODE_FMT_LOCAL:
99
++                case XFS_DINODE_FMT_EXTENTS:
100
++                case XFS_DINODE_FMT_BTREE:
101
++                        break;
102
++                default:
103
++                        return false;
104
++                }
105
++        }
106
++
107
++
108
+ 	/* only version 3 or greater inodes are extensively verified here */
109
+ 	if (dip->di_version < 3)
110
+ 		return true;
111
+@@ -420,7 +484,6 @@ xfs_dinode_verify(
112
+ 	if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid))
113
+ 		return false;
114
+ 
115
+-	flags = be16_to_cpu(dip->di_flags);
116
+ 	flags2 = be64_to_cpu(dip->di_flags2);
117
+ 
118
+ 	/* don't allow reflink/cowextsize if we don't have reflink */
119
+@@ -428,6 +491,10 @@ xfs_dinode_verify(
120
+             !xfs_sb_version_hasreflink(&mp->m_sb))
121
+ 		return false;
122
+ 
123
++        /* only regular files get reflink */
124
++        if ((flags2 & XFS_DIFLAG2_REFLINK) && (mode & S_IFMT) != S_IFREG)
125
++                return false;
126
++
127
+ 	/* don't let reflink and realtime mix */
128
+ 	if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME))
129
+ 		return false;
130
+diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
131
+index 4e30448..8dd7658 100644
132
+--- a/fs/xfs/libxfs/xfs_inode_fork.c
133
+@@ -90,70 +90,11 @@ xfs_iformat_fork(
134
+ 	int			error = 0;
135
+ 	xfs_fsize_t             di_size;
136
+ 
137
+-	if (unlikely(be32_to_cpu(dip->di_nextents) +
138
+-		     be16_to_cpu(dip->di_anextents) >
139
+-		     be64_to_cpu(dip->di_nblocks))) {
140
+-		xfs_warn(ip->i_mount,
141
+-			"corrupt dinode %Lu, extent total = %d, nblocks = %Lu.",
142
+-			(unsigned long long)ip->i_ino,
143
+-			(int)(be32_to_cpu(dip->di_nextents) +
144
+-			      be16_to_cpu(dip->di_anextents)),
145
+-			(unsigned long long)
146
+-				be64_to_cpu(dip->di_nblocks));
147
+-		XFS_CORRUPTION_ERROR("xfs_iformat(1)", XFS_ERRLEVEL_LOW,
148
+-				     ip->i_mount, dip);
149
+-		return -EFSCORRUPTED;
150
+-	}
151
+-
152
+-	if (unlikely(dip->di_forkoff > ip->i_mount->m_sb.sb_inodesize)) {
153
+-		xfs_warn(ip->i_mount, "corrupt dinode %Lu, forkoff = 0x%x.",
154
+-			(unsigned long long)ip->i_ino,
155
+-			dip->di_forkoff);
156
+-		XFS_CORRUPTION_ERROR("xfs_iformat(2)", XFS_ERRLEVEL_LOW,
157
+-				     ip->i_mount, dip);
158
+-		return -EFSCORRUPTED;
159
+-	}
160
+-
161
+-	if (unlikely((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) &&
162
+-		     !ip->i_mount->m_rtdev_targp)) {
163
+-		xfs_warn(ip->i_mount,
164
+-			"corrupt dinode %Lu, has realtime flag set.",
165
+-			ip->i_ino);
166
+-		XFS_CORRUPTION_ERROR("xfs_iformat(realtime)",
167
+-				     XFS_ERRLEVEL_LOW, ip->i_mount, dip);
168
+-		return -EFSCORRUPTED;
169
+-	}
170
+-
171
+-	if (unlikely(xfs_is_reflink_inode(ip) &&
172
+-	    (VFS_I(ip)->i_mode & S_IFMT) != S_IFREG)) {
173
+-		xfs_warn(ip->i_mount,
174
+-			"corrupt dinode %llu, wrong file type for reflink.",
175
+-			ip->i_ino);
176
+-		XFS_CORRUPTION_ERROR("xfs_iformat(reflink)",
177
+-				     XFS_ERRLEVEL_LOW, ip->i_mount, dip);
178
+-		return -EFSCORRUPTED;
179
+-	}
180
+-
181
+-	if (unlikely(xfs_is_reflink_inode(ip) &&
182
+-	    (ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) {
183
+-		xfs_warn(ip->i_mount,
184
+-			"corrupt dinode %llu, has reflink+realtime flag set.",
185
+-			ip->i_ino);
186
+-		XFS_CORRUPTION_ERROR("xfs_iformat(reflink)",
187
+-				     XFS_ERRLEVEL_LOW, ip->i_mount, dip);
188
+-		return -EFSCORRUPTED;
189
+-	}
190
+-
191
+ 	switch (VFS_I(ip)->i_mode & S_IFMT) {
192
+ 	case S_IFIFO:
193
+ 	case S_IFCHR:
194
+ 	case S_IFBLK:
195
+ 	case S_IFSOCK:
196
+-		if (unlikely(dip->di_format != XFS_DINODE_FMT_DEV)) {
197
+-			XFS_CORRUPTION_ERROR("xfs_iformat(3)", XFS_ERRLEVEL_LOW,
198
+-					      ip->i_mount, dip);
199
+-			return -EFSCORRUPTED;
200
+-		}
201
+ 		ip->i_d.di_size = 0;
202
+ 		ip->i_df.if_u2.if_rdev = xfs_dinode_get_rdev(dip);
203
+ 		break;
204
+@@ -163,32 +104,7 @@ xfs_iformat_fork(
205
+ 	case S_IFDIR:
206
+ 		switch (dip->di_format) {
207
+ 		case XFS_DINODE_FMT_LOCAL:
208
+-			/*
209
+-			 * no local regular files yet
210
+-			 */
211
+-			if (unlikely(S_ISREG(be16_to_cpu(dip->di_mode)))) {
212
+-				xfs_warn(ip->i_mount,
213
+-			"corrupt inode %Lu (local format for regular file).",
214
+-					(unsigned long long) ip->i_ino);
215
+-				XFS_CORRUPTION_ERROR("xfs_iformat(4)",
216
+-						     XFS_ERRLEVEL_LOW,
217
+-						     ip->i_mount, dip);
218
+-				return -EFSCORRUPTED;
219
+-			}
220
+-
221
+ 			di_size = be64_to_cpu(dip->di_size);
222
+-			if (unlikely(di_size < 0 ||
223
+-				     di_size > XFS_DFORK_DSIZE(dip, ip->i_mount))) {
224
+-				xfs_warn(ip->i_mount,
225
+-			"corrupt inode %Lu (bad size %Ld for local inode).",
226
+-					(unsigned long long) ip->i_ino,
227
+-					(long long) di_size);
228
+-				XFS_CORRUPTION_ERROR("xfs_iformat(5)",
229
+-						     XFS_ERRLEVEL_LOW,
230
+-						     ip->i_mount, dip);
231
+-				return -EFSCORRUPTED;
232
+-			}
233
+-
234
+ 			size = (int)di_size;
235
+ 			error = xfs_iformat_local(ip, dip, XFS_DATA_FORK, size);
236
+ 			break;
237
+@@ -199,14 +115,11 @@ xfs_iformat_fork(
238
+ 			error = xfs_iformat_btree(ip, dip, XFS_DATA_FORK);
239
+ 			break;
240
+ 		default:
241
+-			XFS_ERROR_REPORT("xfs_iformat(6)", XFS_ERRLEVEL_LOW,
242
+-					 ip->i_mount);
243
+ 			return -EFSCORRUPTED;
244
+ 		}
245
+ 		break;
246
+ 
247
+ 	default:
248
+-		XFS_ERROR_REPORT("xfs_iformat(7)", XFS_ERRLEVEL_LOW, ip->i_mount);
249
+ 		return -EFSCORRUPTED;
250
+ 	}
251
+ 	if (error)
252
+-- 
253
+2.7.4
254
+
0 255
new file mode 100644
... ...
@@ -0,0 +1,64 @@
0
+commit 50aa90ef03007beca2c9108993f5b4f2bb4f0a66
1
+Author: Darrick J. Wong <darrick.wong@oracle.com>
2
+Date:   Mon Jan 8 10:51:04 2018 -0800
3
+
4
+    xfs: verify dinode header first
5
+
6
+    Move the v3 inode integrity information (crc, owner, metauuid) before we
7
+    look at anything else in the inode so that we don't waste time on a torn
8
+    write or a totally garbled block.  This makes xfs_dinode_verify more
9
+    consistent with the other verifiers.
10
+
11
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
12
+Reviewed-by: Dave Chinner <dchinner@redhat.com>
13
+
14
+[ Srinidhi Rao : Backported this fix to 4.9]
15
+Signed-off-by: srinidhira0 <srinidhir@vmware.com>
16
+---
17
+ fs/xfs/libxfs/xfs_inode_buf.c | 23 +++++++++++++----------
18
+ 1 file changed, 13 insertions(+), 10 deletions(-)
19
+
20
+diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
21
+index 0c1dd97..5872cd9 100644
22
+--- a/fs/xfs/libxfs/xfs_inode_buf.c
23
+@@ -395,6 +395,19 @@ xfs_dinode_verify(
24
+ 	if (dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC))
25
+ 		return false;
26
+ 
27
++	/* Verify v3 integrity information first */
28
++	if (dip->di_version >= 3) {
29
++		if (!xfs_sb_version_hascrc(&mp->m_sb))
30
++			return false;
31
++		if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize,
32
++					XFS_DINODE_CRC_OFF))
33
++			return false;
34
++		if (be64_to_cpu(dip->di_ino) != ip->i_ino)
35
++			return false;
36
++		if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid))
37
++			return false;
38
++	}
39
++
40
+ 	/* don't allow invalid i_size */
41
+         di_size = be64_to_cpu(dip->di_size);
42
+         if (di_size & (1ULL << 63))
43
+@@ -474,16 +487,6 @@ xfs_dinode_verify(
44
+ 	if (dip->di_version < 3)
45
+ 		return true;
46
+ 
47
+-	if (!xfs_sb_version_hascrc(&mp->m_sb))
48
+-		return false;
49
+-	if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize,
50
+-			      XFS_DINODE_CRC_OFF))
51
+-		return false;
52
+-	if (be64_to_cpu(dip->di_ino) != ip->i_ino)
53
+-		return false;
54
+-	if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid))
55
+-		return false;
56
+-
57
+ 	flags2 = be64_to_cpu(dip->di_flags2);
58
+ 
59
+ 	/* don't allow reflink/cowextsize if we don't have reflink */
60
+-- 
61
+2.7.4
62
+
0 63
new file mode 100644
... ...
@@ -0,0 +1,78 @@
0
+commit b42db0860e13067fcc7cbfba3966c9e652668bbc
1
+Author: Eric Sandeen <sandeen@sandeen.net>
2
+Date:   Mon Apr 16 23:06:53 2018 -0700
3
+
4
+    xfs: enhance dinode verifier
5
+
6
+    Add several more validations to xfs_dinode_verify:
7
+
8
+    - For LOCAL data fork formats, di_nextents must be 0.
9
+    - For LOCAL attr fork formats, di_anextents must be 0.
10
+    - For inodes with no attr fork offset,
11
+      - format must be XFS_DINODE_FMT_EXTENTS if set at all
12
+      - di_anextents must be 0.
13
+
14
+    Thanks to dchinner for pointing out a couple related checks I had
15
+    forgotten to add.
16
+
17
+    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
18
+    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199377
19
+    Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
20
+    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
21
+
22
+[ Srinidhi Rao : Backported this fix to 4.9 ]
23
+Signed-off-by: srinidhira0 <srinidhir@vmware.com>
24
+---
25
+ fs/xfs/libxfs/xfs_inode_buf.c | 23 ++++++++++++++++++++++-
26
+ 1 file changed, 22 insertions(+), 1 deletion(-)
27
+
28
+diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
29
+index 5872cd9..429ee58 100644
30
+--- a/fs/xfs/libxfs/xfs_inode_buf.c
31
+@@ -456,6 +456,8 @@ xfs_dinode_verify(
32
+                                 return false;
33
+                         if (di_size > XFS_DFORK_DSIZE(dip, mp))
34
+                                 return false;
35
++			if (dip->di_nextents)
36
++				return false;
37
+                 /* fall through */
38
+                 case XFS_DINODE_FMT_EXTENTS:
39
+                 case XFS_DINODE_FMT_BTREE:
40
+@@ -474,13 +476,32 @@ xfs_dinode_verify(
41
+         if (XFS_DFORK_Q(dip)) {
42
+                 switch (dip->di_aformat) {
43
+                 case XFS_DINODE_FMT_LOCAL:
44
++			if (dip->di_anextents)
45
++				return false;
46
++		/* fall through */
47
+                 case XFS_DINODE_FMT_EXTENTS:
48
+                 case XFS_DINODE_FMT_BTREE:
49
+                         break;
50
+                 default:
51
+                         return false;
52
+                 }
53
+-        }
54
++        } else {
55
++		/*
56
++		 * If there is no fork offset, this may be a freshly-made inode
57
++		 * in a new disk cluster, in which case di_aformat is zeroed.
58
++		 * Otherwise, such an inode must be in EXTENTS format; this goes
59
++		 * for freed inodes as well.
60
++		 */
61
++		switch (dip->di_aformat) {
62
++		case 0:
63
++		case XFS_DINODE_FMT_EXTENTS:
64
++			break;
65
++		default:
66
++			return false;
67
++		}
68
++		if (dip->di_anextents)
69
++			return false;
70
++	}
71
+ 
72
+ 
73
+ 	/* only version 3 or greater inodes are extensively verified here */
74
+-- 
75
+2.7.4
76
+
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux-aws
4 4
 Version:        4.9.111
5
-Release:        3%{?kat_build:.%kat_build}%{?dist}
5
+Release:        4%{?kat_build:.%kat_build}%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
8 8
 Group:        	System Environment/Kernel
... ...
@@ -65,6 +65,10 @@ Patch43:        0001-scsi-libsas-direct-call-probe-and-destruct.patch
65 65
 Patch44:        0001-f2fs-fix-race-condition-in-between-free-nid-allocator-initializer.patch
66 66
 # Fix for CVE-2018-10323
67 67
 Patch45:        0001-xfs-set-format-back-to-extents-if-xfs_bmap_extents_t.patch
68
+# Fix for CVE-2018-10322
69
+Patch46:        0001-xfs-move-inode-fork-verifiers-to-xfs-dinode-verify.patch
70
+Patch47:        0002-xfs-verify-dinode-header-first.patch
71
+Patch48:        0003-xfs-enhance-dinode-verifier.patch
68 72
 
69 73
 # For Spectre
70 74
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -240,6 +244,9 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
240 240
 %patch43 -p1
241 241
 %patch44 -p1
242 242
 %patch45 -p1
243
+%patch46 -p1
244
+%patch47 -p1
245
+%patch48 -p1
243 246
 
244 247
 %patch52 -p1
245 248
 %patch53 -p1
... ...
@@ -460,6 +467,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
460 460
 /usr/share/doc/*
461 461
 
462 462
 %changelog
463
+*   Thu Jul 17 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-4
464
+-   Fix CVE-2018-10322
463 465
 *   Thu Jul 12 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-3
464 466
 -   Fix CVE-2017-18232, CVE-2017-18249 and CVE-2018-10323
465 467
 *   Wed Jul 11 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.111-2
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux-esx
4 4
 Version:        4.9.111
5
-Release:        2%{?dist}
5
+Release:        3%{?dist}
6 6
 License:        GPLv2
7 7
 URL:            http://www.kernel.org/
8 8
 Group:          System Environment/Kernel
... ...
@@ -62,6 +62,10 @@ Patch43:        0001-scsi-libsas-direct-call-probe-and-destruct.patch
62 62
 Patch44:        0001-f2fs-fix-race-condition-in-between-free-nid-allocator-initializer.patch
63 63
 # Fix for CVE-2018-10323
64 64
 Patch45:        0001-xfs-set-format-back-to-extents-if-xfs_bmap_extents_t.patch
65
+# Fix for CVE-2018-10322
66
+Patch46:        0001-xfs-move-inode-fork-verifiers-to-xfs-dinode-verify.patch
67
+Patch47:        0002-xfs-verify-dinode-header-first.patch
68
+Patch48:        0003-xfs-enhance-dinode-verifier.patch
65 69
 
66 70
 # For Spectre
67 71
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -156,6 +160,9 @@ The Linux package contains the Linux kernel doc files
156 156
 %patch43 -p1
157 157
 %patch44 -p1
158 158
 %patch45 -p1
159
+%patch46 -p1
160
+%patch47 -p1
161
+%patch48 -p1
159 162
 
160 163
 %patch52 -p1
161 164
 %patch53 -p1
... ...
@@ -268,6 +275,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
268 268
 /usr/src/linux-headers-%{uname_r}
269 269
 
270 270
 %changelog
271
+*   Thu Jul 17 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-3
272
+-   Fix CVE-2018-10322
271 273
 *   Thu Jul 12 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-2
272 274
 -   Fix CVE-2017-18232, CVE-2017-18249 and CVE-2018-10323
273 275
 *   Sat Jul 07 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.111-1
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux-secure
4 4
 Version:        4.9.111
5
-Release:        2%{?kat_build:.%kat_build}%{?dist}
5
+Release:        3%{?kat_build:.%kat_build}%{?dist}
6 6
 License:        GPLv2
7 7
 URL:            http://www.kernel.org/
8 8
 Group:          System Environment/Kernel
... ...
@@ -71,6 +71,10 @@ Patch45:        0001-scsi-libsas-direct-call-probe-and-destruct.patch
71 71
 Patch46:        0001-f2fs-fix-race-condition-in-between-free-nid-allocator-initializer.patch
72 72
 # Fix for CVE-2018-10323
73 73
 Patch47:        0001-xfs-set-format-back-to-extents-if-xfs_bmap_extents_t.patch
74
+# Fix for CVE-2018-10322
75
+Patch48:        0001-xfs-move-inode-fork-verifiers-to-xfs-dinode-verify.patch
76
+Patch49:        0002-xfs-verify-dinode-header-first.patch
77
+Patch50:        0003-xfs-enhance-dinode-verifier.patch
74 78
 
75 79
 # For Spectre
76 80
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -208,6 +212,9 @@ EOF
208 208
 %patch45 -p1
209 209
 %patch46 -p1
210 210
 %patch47 -p1
211
+%patch48 -p1
212
+%patch49 -p1
213
+%patch50 -p1
211 214
 
212 215
 # spectre
213 216
 %patch52 -p1
... ...
@@ -355,6 +362,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
355 355
 /usr/src/linux-headers-%{uname_r}
356 356
 
357 357
 %changelog
358
+*   Thu Jul 17 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-3
359
+-   Fix CVE-2018-10322
358 360
 *   Thu Jul 12 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-2
359 361
 -   Fix CVE-2017-18232, CVE-2017-18249 and CVE-2018-10323
360 362
 *   Sat Jul 07 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.111-1
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux
4 4
 Version:        4.9.111
5
-Release:        3%{?kat_build:.%kat_build}%{?dist}
5
+Release:        4%{?kat_build:.%kat_build}%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
8 8
 Group:        	System Environment/Kernel
... ...
@@ -69,6 +69,11 @@ Patch43:        0001-scsi-libsas-direct-call-probe-and-destruct.patch
69 69
 Patch44:        0001-f2fs-fix-race-condition-in-between-free-nid-allocator-initializer.patch
70 70
 # Fix for CVE-2018-10323
71 71
 Patch45:        0001-xfs-set-format-back-to-extents-if-xfs_bmap_extents_t.patch
72
+# Fix for CVE-2018-10322
73
+Patch46:        0001-xfs-move-inode-fork-verifiers-to-xfs-dinode-verify.patch
74
+Patch47:        0002-xfs-verify-dinode-header-first.patch
75
+Patch48:        0003-xfs-enhance-dinode-verifier.patch
76
+
72 77
 
73 78
 # For Spectre
74 79
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -199,6 +204,9 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
199 199
 %patch43 -p1
200 200
 %patch44 -p1
201 201
 %patch45 -p1
202
+%patch46 -p1
203
+%patch47 -p1
204
+%patch48 -p1
202 205
 
203 206
 %patch52 -p1
204 207
 %patch53 -p1
... ...
@@ -382,6 +390,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
382 382
 /usr/share/doc/*
383 383
 
384 384
 %changelog
385
+*   Thu Jul 17 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-4
386
+-   Fix CVE-2018-10322
385 387
 *   Thu Jul 12 2018 Srinidhi Rao <srinidhir@vmware.com> 4.9.111-3
386 388
 -   Fix CVE-2017-18232, CVE-2017-18249 and CVE-2018-10323
387 389
 *   Wed Jul 11 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.111-2