Browse code

kernels: Update to version 4.9.89

Some local patches are not needed anymore as their equivalent patches
have been merged into the upstream stable kernel. These patches are
listed below:

- dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch:
is replaced by commit 7e2fb808d3c7c52f88ebc670949dbf1bae48f2a2 (dccp:
CVE-2017-8824: use-after-free in DCCP code)

- 0152-fs-prevent-speculative-execution.patch:
is replaced by commit c26ceec69576cb61157d2487812fb2776e125260 (vfs,
fdtable: Prevent bounds-check bypass via speculative execution)

- 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch:
is replaced by commit 22b5557f1fef4adaddfc9fe6a0cd72d0be69bef1
(x86/entry/64: Clear extra registers beyond syscall arguments, to
reduce speculation attack surface)

- 0170-x86-syscall-Clear-unused-extra-registers-on-32-bit-c.patch:
is replaced by commit 7b559f7f08a835ff0e720afb67c18db3e1bf1b86
(x86/entry/64/compat: Clear registers for compat syscalls, to reduce
speculation attack surface)


A note about changes to 0003-Added-PAX_RANDKSTACK.patch:

commit d7f8d17406d62f0c8b20a9100d34d0e203557fe1 (x86/entry/64: Remove
the SYSCALL64 fast path) merged the fastpath and slowpath for syscall
entry into a single code flow, thus making it necessary to adapt to
the new codebase.


Also, while at it, fix a "bogus date" issue in linux-secure.spec

Change-Id: If04f29b27d665446401b0b3eb7300800385dc4c3
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4930
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>

Srivatsa S. Bhat authored on 2018/03/23 07:58:58
Showing 12 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 Summary:	Linux API header files
2 2
 Name:		linux-api-headers
3
-Version:	4.9.80
3
+Version:	4.9.89
4 4
 Release:	1%{?dist}
5 5
 License:	GPLv2
6 6
 URL:		http://www.kernel.org/
... ...
@@ -8,7 +8,7 @@ Group:		System Environment/Kernel
8 8
 Vendor:		VMware, Inc.
9 9
 Distribution: Photon
10 10
 Source0:        http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
11
-%define sha1 linux=1e815669d45b0e0ebfa14bfa9823e9795274f067
11
+%define sha1 linux=81a81adbdc191ce09133d1d512b87a53e87fa967
12 12
 BuildArch:	noarch
13 13
 %description
14 14
 The Linux API Headers expose the kernel's API for use by Glibc.
... ...
@@ -25,6 +25,8 @@ find /%{buildroot}%{_includedir} \( -name .install -o -name ..install.cmd \) -de
25 25
 %defattr(-,root,root)
26 26
 %{_includedir}/*
27 27
 %changelog
28
+*   Thu Mar 22 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.89-1
29
+-   Update to version 4.9.89
28 30
 *   Mon Feb 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-1
29 31
 -   Update to version 4.9.80
30 32
 *   Wed Jan 31 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.79-1
... ...
@@ -1172,13 +1172,14 @@ index 9976fce..bf5f3e0 100644
1172 1172
 +CFLAGS_REMOVE_syscall_32.o = $(RAP_PLUGIN_ABS_CFLAGS)
1173 1173
 +CFLAGS_REMOVE_syscall_64.o = $(RAP_PLUGIN_ABS_CFLAGS)
1174 1174
 diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
1175
-index bdd9cc5..790badd 100644
1175
+index b0cd306..f384da6 100644
1176 1176
 --- a/arch/x86/entry/common.c
1177 1177
 +++ b/arch/x86/entry/common.c
1178
-@@ -277,9 +277,29 @@ __visible void do_syscall_64(struct pt_regs *regs)
1179
- 	 * regs->orig_ax, which changes the behavior of some syscalls.
1178
+@@ -279,9 +279,30 @@ __visible void do_syscall_64(struct pt_regs *regs)
1180 1179
  	 */
1181 1180
  	if (likely((nr & __SYSCALL_MASK) < NR_syscalls)) {
1181
+ 		nr = array_index_nospec(nr & __SYSCALL_MASK, NR_syscalls);
1182
++
1182 1183
 +#ifdef CONFIG_PAX_RAP
1183 1184
 +		asm volatile("movq %[param1],%%rdi\n\t"
1184 1185
 +			     "movq %[param2],%%rsi\n\t"
... ...
@@ -1189,7 +1190,7 @@ index bdd9cc5..790badd 100644
1189 1189
 +			     "call *%P[syscall]\n\t"
1190 1190
 +			     "mov %%rax,%[result]\n\t"
1191 1191
 +			: [result] "=m" (regs->ax)
1192
-+			: [syscall] "m" (sys_call_table[nr & __SYSCALL_MASK]),
1192
++			: [syscall] "m" (sys_call_table[nr]),
1193 1193
 +			  [param1] "m" (regs->di),
1194 1194
 +			  [param2] "m" (regs->si),
1195 1195
 +			  [param3] "m" (regs->dx),
... ...
@@ -1198,7 +1199,7 @@ index bdd9cc5..790badd 100644
1198 1198
 +			  [param6] "m" (regs->r9)
1199 1199
 +			: "ax", "di", "si", "dx", "cx", "r8", "r9", "r10", "r11", "memory");
1200 1200
 +#else
1201
- 		regs->ax = sys_call_table[nr & __SYSCALL_MASK](
1201
+ 		regs->ax = sys_call_table[nr](
1202 1202
  			regs->di, regs->si, regs->dx,
1203 1203
  			regs->r10, regs->r8, regs->r9);
1204 1204
 +#endif
... ...
@@ -4544,10 +4545,10 @@ index a260cde..1b99d3b 100644
4544 4544
  	int len = strlen(kmessage);
4545 4545
  
4546 4546
 diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
4547
-index 9269d56..78d2a06 100644
4547
+index b90ef96..12f6ec5 100644
4548 4548
 --- a/drivers/video/console/dummycon.c
4549 4549
 +++ b/drivers/video/console/dummycon.c
4550
-@@ -41,12 +41,60 @@ static void dummycon_init(struct vc_data *vc, int init)
4550
+@@ -41,12 +41,55 @@ static void dummycon_init(struct vc_data *vc, int init)
4551 4551
  	vc_resize(vc, DUMMY_COLUMNS, DUMMY_ROWS);
4552 4552
  }
4553 4553
  
... ...
@@ -4593,11 +4594,6 @@ index 9269d56..78d2a06 100644
4593 4593
 +    return 0;
4594 4594
 +}
4595 4595
 +
4596
-+static int dummycon_font_get(struct vc_data *a, struct console_font *b)
4597
-+{
4598
-+    return 0;
4599
-+}
4600
-+
4601 4596
 +static int dummycon_font_default(struct vc_data *a, struct console_font *b , char *c)
4602 4597
 +{
4603 4598
 +    return 0;
... ...
@@ -4610,7 +4606,7 @@ index 9269d56..78d2a06 100644
4610 4610
  
4611 4611
  /*
4612 4612
   *  The console `switch' structure for the dummy console
4613
-@@ -58,17 +106,17 @@ const struct consw dummy_con = {
4613
+@@ -58,16 +101,16 @@ const struct consw dummy_con = {
4614 4614
      .owner =		THIS_MODULE,
4615 4615
      .con_startup =	dummycon_startup,
4616 4616
      .con_init =		dummycon_init,
... ...
@@ -4623,7 +4619,6 @@ index 9269d56..78d2a06 100644
4623 4623
 -    .con_switch =	DUMMY,
4624 4624
 -    .con_blank =	DUMMY,
4625 4625
 -    .con_font_set =	DUMMY,
4626
--    .con_font_get =	DUMMY,
4627 4626
 -    .con_font_default =	DUMMY,
4628 4627
 -    .con_font_copy =	DUMMY,
4629 4628
 +    .con_deinit =	dummycon_deinit,
... ...
@@ -4635,7 +4630,6 @@ index 9269d56..78d2a06 100644
4635 4635
 +    .con_switch =	dummycon_switch,
4636 4636
 +    .con_blank =	dummycon_blank,
4637 4637
 +    .con_font_set =	dummycon_font_set,
4638
-+    .con_font_get =	dummycon_font_get,
4639 4638
 +    .con_font_default =	dummycon_font_default,
4640 4639
 +    .con_font_copy =	dummycon_font_copy,
4641 4640
  };
... ...
@@ -30,24 +30,15 @@ index af4e581..3547f1f 100644
30 30
  .macro TRACE_IRQS_IRETQ
31 31
  #ifdef CONFIG_TRACE_IRQFLAGS
32 32
  	bt	$9, EFLAGS(%rsp)		/* interrupts off? */
33
-@@ -225,6 +235,8 @@ entry_SYSCALL_64_fastpath:
34
- 	testl	$_TIF_ALLWORK_MASK, TASK_TI_flags(%r11)
35
- 	jnz	1f
36
- 
37
-+	pax_rand_kstack
38
-+
39
- 	LOCKDEP_SYS_EXIT
40
- 	TRACE_IRQS_ON		/* user mode is traced as IRQs on */
41
- 	movq	RIP(%rsp), %rcx
42
-@@ -261,6 +273,8 @@ entry_SYSCALL64_slow_path:
33
+@@ -201,6 +201,8 @@ GLOBAL(entry_SYSCALL_64_after_swapgs)
34
+ 	movq	%rsp, %rdi
43 35
  	call	do_syscall_64		/* returns with IRQs disabled */
44 36
  
45
- return_from_SYSCALL_64:
46 37
 +	pax_rand_kstack
47 38
 +
39
+ 	RESTORE_EXTRA_REGS
48 40
  	TRACE_IRQS_IRETQ		/* we're about to change IF */
49 41
  
50
- 	/*
51 42
 @@ -449,6 +463,7 @@ ENTRY(ret_from_fork)
52 43
  2:
53 44
  	movq	%rsp, %rdi
... ...
@@ -36,12 +36,13 @@ index 1a87443..ea4a86e 100644
36 36
  	WARN_ON(xen_cpuhp_setup());
37 37
  	xen_unplug_emulated_devices();
38 38
 diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
39
-index 7f664c4..a88065e 100644
39
+index 4ecd0de..8ad0c96 100644
40 40
 --- a/arch/x86/xen/suspend.c
41 41
 +++ b/arch/x86/xen/suspend.c
42
-@@ -1,14 +1,19 @@
42
+@@ -1,17 +1,22 @@
43 43
  #include <linux/types.h>
44 44
  #include <linux/tick.h>
45
+ #include <linux/percpu-defs.h>
45 46
 +#include <linux/syscore_ops.h>
46 47
 +#include <linux/kernel_stat.h>
47 48
  
... ...
@@ -52,6 +53,8 @@ index 7f664c4..a88065e 100644
52 52
  #include <xen/events.h>
53 53
 +#include <xen/xen-ops.h>
54 54
  
55
+ #include <asm/cpufeatures.h>
56
+ #include <asm/msr-index.h>
55 57
  #include <asm/xen/hypercall.h>
56 58
  #include <asm/xen/page.h>
57 59
  #include <asm/fixmap.h>
58 60
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-commit 69c64866ce072dea1d1e59a0d61e0f66c0dffb76
2
-Author: Mohamed Ghannam <simo.ghannam@gmail.com>
3
-Date:   Tue Dec 5 20:58:35 2017 +0000
4
-
5
-    dccp: CVE-2017-8824: use-after-free in DCCP code
6
-
7
-    Whenever the sock object is in DCCP_CLOSED state,
8
-    dccp_disconnect() must free dccps_hc_tx_ccid and
9
-    dccps_hc_rx_ccid and set to NULL.
10
-
11
-    Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
12
-    Reviewed-by: Eric Dumazet <edumazet@google.com>
13
-    Signed-off-by: David S. Miller <davem@davemloft.net>
14
-
15
-diff --git a/net/dccp/proto.c b/net/dccp/proto.c
16
-index b68168f..9d43c1f 100644
17
-+++ b/net/dccp/proto.c
18
-@@ -259,6 +259,7 @@ int dccp_disconnect(struct sock *sk, int flags)
19
- {
20
- 	struct inet_connection_sock *icsk = inet_csk(sk);
21
- 	struct inet_sock *inet = inet_sk(sk);
22
-+	struct dccp_sock *dp = dccp_sk(sk);
23
- 	int err = 0;
24
- 	const int old_state = sk->sk_state;
25
- 
26
-@@ -278,6 +279,10 @@ int dccp_disconnect(struct sock *sk, int flags)
27
- 		sk->sk_err = ECONNRESET;
28
- 
29
- 	dccp_clear_xmit_timers(sk);
30
-+	ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
31
-+	ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
32
-+	dp->dccps_hc_rx_ccid = NULL;
33
-+	dp->dccps_hc_tx_ccid = NULL;
34
- 
35
- 	__skb_queue_purge(&sk->sk_receive_queue);
36
- 	__skb_queue_purge(&sk->sk_write_queue);
... ...
@@ -1,15 +1,15 @@
1 1
 %global security_hardening none
2 2
 Summary:        Kernel
3 3
 Name:           linux-aws
4
-Version:        4.9.80
5
-Release:        4%{?kat_build:.%kat_build}%{?dist}
4
+Version:        4.9.89
5
+Release:        1%{?kat_build:.%kat_build}%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
8 8
 Group:        	System Environment/Kernel
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution: 	Photon
11 11
 Source0:        http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
12
-%define sha1 linux=1e815669d45b0e0ebfa14bfa9823e9795274f067
12
+%define sha1 linux=81a81adbdc191ce09133d1d512b87a53e87fa967
13 13
 Source1:	config-aws
14 14
 Source2:	initramfs.trigger
15 15
 # common
... ...
@@ -42,8 +42,6 @@ Patch25:        0002-allow-also-ecb-cipher_null.patch
42 42
 Patch26:        add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
43 43
 # Fix CVE-2017-1000252
44 44
 Patch28:        kvm-dont-accept-wrong-gsi-values.patch
45
-# Fix CVE-2017-8824
46
-Patch29:        dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
47 45
 Patch32:        revert-SMB-validate-negotiate-even-if-signing-off.patch
48 46
 # For Spectre
49 47
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -57,12 +55,9 @@ Patch59: 0148-cw1200-prevent-speculative-execution.patch
57 57
 Patch60: 0149-Thermal-int340x-prevent-speculative-execution.patch
58 58
 Patch61: 0150-ipv4-prevent-speculative-execution.patch
59 59
 Patch62: 0151-ipv6-prevent-speculative-execution.patch
60
-Patch63: 0152-fs-prevent-speculative-execution.patch
61 60
 Patch64: 0153-net-mpls-prevent-speculative-execution.patch
62 61
 Patch65: 0154-udf-prevent-speculative-execution.patch
63 62
 Patch66: 0155-userns-prevent-speculative-execution.patch
64
-Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch
65
-Patch68: 0170-x86-syscall-Clear-unused-extra-registers-on-32-bit-c.patch
66 63
 # Amazon AWS
67 64
 Patch101: 0002-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
68 65
 Patch102: 0009-bump-the-default-TTL-to-255.patch
... ...
@@ -206,7 +201,6 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
206 206
 %patch25 -p1
207 207
 %patch26 -p1
208 208
 %patch28 -p1
209
-%patch29 -p1
210 209
 %patch32 -p1
211 210
 
212 211
 %patch52 -p1
... ...
@@ -220,12 +214,9 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
220 220
 %patch60 -p1
221 221
 %patch61 -p1
222 222
 %patch62 -p1
223
-%patch63 -p1
224 223
 %patch64 -p1
225 224
 %patch65 -p1
226 225
 %patch66 -p1
227
-%patch67 -p1
228
-%patch68 -p1
229 226
 
230 227
 %patch101 -p1
231 228
 %patch102 -p1
... ...
@@ -430,6 +421,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
430 430
 /usr/share/doc/*
431 431
 
432 432
 %changelog
433
+*   Thu Mar 22 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.89-1
434
+-   Update to version 4.9.89
433 435
 *   Fri Mar 16 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-4
434 436
 -   Tweak config options to fix issues on AWS.
435 437
 *   Thu Mar 1 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-3
... ...
@@ -1,7 +1,7 @@
1 1
 %global security_hardening none
2 2
 Summary:        Kernel
3 3
 Name:           linux-esx
4
-Version:        4.9.80
4
+Version:        4.9.89
5 5
 Release:        1%{?dist}
6 6
 License:        GPLv2
7 7
 URL:            http://www.kernel.org/
... ...
@@ -9,7 +9,7 @@ Group:          System Environment/Kernel
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11 11
 Source0:        http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
12
-%define sha1 linux=1e815669d45b0e0ebfa14bfa9823e9795274f067
12
+%define sha1 linux=81a81adbdc191ce09133d1d512b87a53e87fa967
13 13
 Source1:        config-esx
14 14
 Source2:        initramfs.trigger
15 15
 # common
... ...
@@ -39,8 +39,6 @@ Patch22:        add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.pat
39 39
 # Fix CVE-2017-1000252
40 40
 Patch24:        kvm-dont-accept-wrong-gsi-values.patch
41 41
 Patch25:        init-do_mounts-recreate-dev-root.patch
42
-# Fix CVE-2017-8824
43
-Patch26:        dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
44 42
 Patch29:        revert-SMB-validate-negotiate-even-if-signing-off.patch
45 43
 # For Spectre
46 44
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -54,12 +52,9 @@ Patch59: 0148-cw1200-prevent-speculative-execution.patch
54 54
 Patch60: 0149-Thermal-int340x-prevent-speculative-execution.patch
55 55
 Patch61: 0150-ipv4-prevent-speculative-execution.patch
56 56
 Patch62: 0151-ipv6-prevent-speculative-execution.patch
57
-Patch63: 0152-fs-prevent-speculative-execution.patch
58 57
 Patch64: 0153-net-mpls-prevent-speculative-execution.patch
59 58
 Patch65: 0154-udf-prevent-speculative-execution.patch
60 59
 Patch66: 0155-userns-prevent-speculative-execution.patch
61
-Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch
62
-Patch68: 0170-x86-syscall-Clear-unused-extra-registers-on-32-bit-c.patch
63 60
 
64 61
 BuildRequires: bc
65 62
 BuildRequires: kbd
... ...
@@ -121,7 +116,6 @@ The Linux package contains the Linux kernel doc files
121 121
 %patch22 -p1
122 122
 %patch24 -p1
123 123
 %patch25 -p1
124
-%patch26 -p1
125 124
 %patch29 -p1
126 125
 
127 126
 %patch52 -p1
... ...
@@ -135,12 +129,9 @@ The Linux package contains the Linux kernel doc files
135 135
 %patch60 -p1
136 136
 %patch61 -p1
137 137
 %patch62 -p1
138
-%patch63 -p1
139 138
 %patch64 -p1
140 139
 %patch65 -p1
141 140
 %patch66 -p1
142
-%patch67 -p1
143
-%patch68 -p1
144 141
 
145 142
 %build
146 143
 # patch vmw_balloon driver
... ...
@@ -237,6 +228,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
237 237
 /usr/src/linux-headers-%{uname_r}
238 238
 
239 239
 %changelog
240
+*   Thu Mar 22 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.89-1
241
+-   Update to version 4.9.89
240 242
 *   Mon Feb 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-1
241 243
 -   Update to version 4.9.80
242 244
 *   Wed Jan 31 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.79-1
... ...
@@ -1,15 +1,15 @@
1 1
 %global security_hardening none
2 2
 Summary:        Kernel
3 3
 Name:           linux-secure
4
-Version:        4.9.80
5
-Release:        2%{?kat_build:.%kat_build}%{?dist}
4
+Version:        4.9.89
5
+Release:        1%{?kat_build:.%kat_build}%{?dist}
6 6
 License:        GPLv2
7 7
 URL:            http://www.kernel.org/
8 8
 Group:          System Environment/Kernel
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11 11
 Source0:        http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
12
-%define sha1 linux=1e815669d45b0e0ebfa14bfa9823e9795274f067
12
+%define sha1 linux=81a81adbdc191ce09133d1d512b87a53e87fa967
13 13
 Source1:        config-secure
14 14
 Source2:        aufs4.9.tar.gz
15 15
 %define sha1 aufs=ebe716ce4b638a3772c7cd3161abbfe11d584906
... ...
@@ -48,8 +48,6 @@ Patch28:        0002-allow-also-ecb-cipher_null.patch
48 48
 Patch29:        add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
49 49
 # Fix CVE-2017-1000252
50 50
 Patch31:        kvm-dont-accept-wrong-gsi-values.patch
51
-# Fix CVE-2017-8824
52
-Patch32:        dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
53 51
 Patch35:        revert-SMB-validate-negotiate-even-if-signing-off.patch
54 52
 # For Spectre
55 53
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -63,12 +61,9 @@ Patch59: 0148-cw1200-prevent-speculative-execution.patch
63 63
 Patch60: 0149-Thermal-int340x-prevent-speculative-execution.patch
64 64
 Patch61: 0150-ipv4-prevent-speculative-execution.patch
65 65
 Patch62: 0151-ipv6-prevent-speculative-execution.patch
66
-Patch63: 0152-fs-prevent-speculative-execution.patch
67 66
 Patch64: 0153-net-mpls-prevent-speculative-execution.patch
68 67
 Patch65: 0154-udf-prevent-speculative-execution.patch
69 68
 Patch66: 0155-userns-prevent-speculative-execution.patch
70
-Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch
71
-Patch68: 0170-x86-syscall-Clear-unused-extra-registers-on-32-bit-c.patch
72 69
 
73 70
 # NSX requirements (should be removed)
74 71
 Patch99:        LKCM.patch
... ...
@@ -174,7 +169,6 @@ EOF
174 174
 %patch28 -p1
175 175
 %patch29 -p1
176 176
 %patch31 -p1
177
-%patch32 -p1
178 177
 %patch35 -p1
179 178
 
180 179
 # spectre
... ...
@@ -189,12 +183,9 @@ EOF
189 189
 %patch60 -p1
190 190
 %patch61 -p1
191 191
 %patch62 -p1
192
-%patch63 -p1
193 192
 %patch64 -p1
194 193
 %patch65 -p1
195 194
 %patch66 -p1
196
-%patch67 -p1
197
-%patch68 -p1
198 195
 
199 196
 # secure
200 197
 %patch13 -p1
... ...
@@ -326,7 +317,9 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
326 326
 /usr/src/linux-headers-%{uname_r}
327 327
 
328 328
 %changelog
329
-*   Mon Mar 18 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.80-2
329
+*   Thu Mar 22 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.89-1
330
+-   Update to version 4.9.89
331
+*   Mon Mar 19 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.80-2
330 332
 -   Extra hardening: slab_nomerge, disable /proc/kcore
331 333
 *   Mon Feb 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-1
332 334
 -   Update to version 4.9.80
... ...
@@ -1,7 +1,7 @@
1 1
 %global security_hardening none
2 2
 Summary:        Kernel
3 3
 Name:           linux
4
-Version:        4.9.80
4
+Version:        4.9.89
5 5
 Release:        1%{?kat_build:.%kat_build}%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
... ...
@@ -9,7 +9,7 @@ Group:        	System Environment/Kernel
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution: 	Photon
11 11
 Source0:        http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
12
-%define sha1 linux=1e815669d45b0e0ebfa14bfa9823e9795274f067
12
+%define sha1 linux=81a81adbdc191ce09133d1d512b87a53e87fa967
13 13
 Source1:	config
14 14
 Source2:	initramfs.trigger
15 15
 %define ena_version 1.1.3
... ...
@@ -45,8 +45,6 @@ Patch25:        0002-allow-also-ecb-cipher_null.patch
45 45
 Patch26:        add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
46 46
 # Fix CVE-2017-1000252
47 47
 Patch28:        kvm-dont-accept-wrong-gsi-values.patch
48
-# Fix CVE-2017-8824
49
-Patch29:        dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
50 48
 Patch32:        revert-SMB-validate-negotiate-even-if-signing-off.patch
51 49
 # For Spectre
52 50
 Patch52: 0141-locking-barriers-introduce-new-observable-speculatio.patch
... ...
@@ -60,12 +58,9 @@ Patch59: 0148-cw1200-prevent-speculative-execution.patch
60 60
 Patch60: 0149-Thermal-int340x-prevent-speculative-execution.patch
61 61
 Patch61: 0150-ipv4-prevent-speculative-execution.patch
62 62
 Patch62: 0151-ipv6-prevent-speculative-execution.patch
63
-Patch63: 0152-fs-prevent-speculative-execution.patch
64 63
 Patch64: 0153-net-mpls-prevent-speculative-execution.patch
65 64
 Patch65: 0154-udf-prevent-speculative-execution.patch
66 65
 Patch66: 0155-userns-prevent-speculative-execution.patch
67
-Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch
68
-Patch68: 0170-x86-syscall-Clear-unused-extra-registers-on-32-bit-c.patch
69 66
 
70 67
 %if 0%{?kat_build:1}
71 68
 Patch1000:	%{kat_build}.patch
... ...
@@ -164,7 +159,6 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
164 164
 %patch25 -p1
165 165
 %patch26 -p1
166 166
 %patch28 -p1
167
-%patch29 -p1
168 167
 %patch32 -p1
169 168
 
170 169
 %patch52 -p1
... ...
@@ -178,12 +172,9 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
178 178
 %patch60 -p1
179 179
 %patch61 -p1
180 180
 %patch62 -p1
181
-%patch63 -p1
182 181
 %patch64 -p1
183 182
 %patch65 -p1
184 183
 %patch66 -p1
185
-%patch67 -p1
186
-%patch68 -p1
187 184
 
188 185
 %if 0%{?kat_build:1}
189 186
 %patch1000 -p1
... ...
@@ -351,6 +342,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
351 351
 /usr/share/doc/*
352 352
 
353 353
 %changelog
354
+*   Thu Mar 22 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.89-1
355
+-   Update to version 4.9.89
354 356
 *   Mon Feb 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.80-1
355 357
 -   Update to version 4.9.80
356 358
 *   Wed Jan 31 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.79-1
357 359
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-From d7ca466502c0427749f64a6bdb47d96f848bf72d Mon Sep 17 00:00:00 2001
2
-From: Elena Reshetova <elena.reshetova@intel.com>
3
-Date: Wed, 30 Aug 2017 13:52:22 +0300
4
-Subject: [PATCH 152/194] fs: prevent speculative execution
5
-
6
-Since the fd value in function __fcheck_files()
7
-seems to be controllable by userspace and later on
8
-conditionally (upon bound check) used to resolve
9
-fdt->fd, insert an observable speculation
10
-barrier before its usage. This should prevent
11
-observable speculation on that branch and avoid
12
-kernel memory leak.
13
-
14
-Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
15
- include/linux/fdtable.h | 4 +++-
16
- 1 file changed, 3 insertions(+), 1 deletion(-)
17
-
18
-diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
19
-index 1c65817..dbc1200 100644
20
-+++ b/include/linux/fdtable.h
21
-@@ -82,8 +82,10 @@ static inline struct file *__fcheck_files(struct files_struct *files, unsigned i
22
- {
23
- 	struct fdtable *fdt = rcu_dereference_raw(files->fdt);
24
- 
25
--	if (fd < fdt->max_fds)
26
-+	if (fd < fdt->max_fds) {
27
-+		osb();
28
- 		return rcu_dereference_raw(fdt->fd[fd]);
29
-+	}
30
- 	return NULL;
31
- }
32
- 
33
-2.9.5
34
-
35 1
deleted file mode 100644
... ...
@@ -1,84 +0,0 @@
1
-From 632c8d1eaacb69fb0e8ed5c6d8e19e4f69a17554 Mon Sep 17 00:00:00 2001
2
-From: Tim Chen <tim.c.chen@linux.intel.com>
3
-Date: Tue, 19 Sep 2017 15:21:40 -0700
4
-Subject: [PATCH 169/194] x86/syscall: Clear unused extra registers on syscall
5
- entrance
6
-
7
-To prevent the unused registers %r12-%r15, %rbp and %rbx from
8
-being used speculatively, we clear them upon syscall entrance
9
-for code hygiene.
10
- arch/x86/entry/calling.h  | 19 +++++++++++++++++++
11
- arch/x86/entry/entry_64.S | 13 ++++++++++---
12
- 2 files changed, 29 insertions(+), 3 deletions(-)
13
-
14
- Removed arch/x86/entry/calling.h changes, as it's in 4.9 upstream already
15
-
16
-diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
17
-index af4e581..9e31419 100644
18
-+++ b/arch/x86/entry/entry_64.S
19
-@@ -176,7 +176,14 @@ GLOBAL(entry_SYSCALL_64_after_swapgs)
20
- 	pushq	%r9				/* pt_regs->r9 */
21
- 	pushq	%r10				/* pt_regs->r10 */
22
- 	pushq	%r11				/* pt_regs->r11 */
23
--	sub	$(6*8), %rsp			/* pt_regs->bp, bx, r12-15 not saved */
24
-+	sub	$(6*8), %rsp			/* pt_regs->bp, bx, r12-15 not used */
25
-+
26
-+	/*
27
-+	 * Clear the unused extra regs for code hygiene.
28
-+	 * Will restore the callee saved extra regs at end of syscall.
29
-+	 */
30
-+	SAVE_EXTRA_REGS
31
-+	ZERO_EXTRA_REGS
32
- 
33
- 	/*
34
- 	 * If we need to do entry work or if we guess we'll need to do
35
-@@ -229,6 +236,7 @@ entry_SYSCALL_64_fastpath:
36
- 	TRACE_IRQS_ON		/* user mode is traced as IRQs on */
37
- 	movq	RIP(%rsp), %rcx
38
- 	movq	EFLAGS(%rsp), %r11
39
-+	RESTORE_EXTRA_REGS
40
- 	RESTORE_C_REGS_EXCEPT_RCX_R11
41
- 	/*
42
- 	 * This opens a window where we have a user CR3, but are
43
-@@ -249,19 +257,16 @@ entry_SYSCALL_64_fastpath:
44
- 	 */
45
- 	TRACE_IRQS_ON
46
- 	ENABLE_INTERRUPTS(CLBR_NONE)
47
--	SAVE_EXTRA_REGS
48
- 	movq	%rsp, %rdi
49
- 	call	syscall_return_slowpath	/* returns with IRQs disabled */
50
- 	jmp	return_from_SYSCALL_64
51
- 
52
- entry_SYSCALL64_slow_path:
53
- 	/* IRQs are off. */
54
--	SAVE_EXTRA_REGS
55
- 	movq	%rsp, %rdi
56
- 	call	do_syscall_64		/* returns with IRQs disabled */
57
- 
58
- return_from_SYSCALL_64:
59
--	RESTORE_EXTRA_REGS
60
- 	TRACE_IRQS_IRETQ		/* we're about to change IF */
61
- 
62
- 	/*
63
-@@ -331,6 +336,7 @@ return_from_SYSCALL_64:
64
- 	 * perf profiles. Nothing jumps here.
65
- 	 */
66
- syscall_return_via_sysret:
67
-+	RESTORE_EXTRA_REGS
68
- 	/* rcx and r11 are already restored (see code above) */
69
- 	RESTORE_C_REGS_EXCEPT_RCX_R11
70
- 	/*
71
-@@ -354,7 +360,7 @@ opportunistic_sysret_failed:
72
- 	 */
73
- 	SWITCH_USER_CR3
74
- 	SWAPGS
75
--	jmp	restore_c_regs_and_iret
76
-+	jmp	restore_regs_and_iret
77
- END(entry_SYSCALL_64)
78
- 
79
- ENTRY(stub_ptregs_64)
80
-2.9.5
81
-
82 1
deleted file mode 100644
... ...
@@ -1,101 +0,0 @@
1
-From 2c536e1e9227a94ce8f3fb8e52591a1c4b9e3975 Mon Sep 17 00:00:00 2001
2
-From: Tim Chen <tim.c.chen@linux.intel.com>
3
-Date: Fri, 15 Sep 2017 19:41:24 -0700
4
-Subject: [PATCH 170/194] x86/syscall: Clear unused extra registers on 32-bit
5
- compatible syscall entrance
6
-
7
-To prevent the unused registers %r8-%r15, from being used speculatively,
8
-we clear them upon syscall entrance for code hygiene in 32 bit compatible
9
-mode.
10
-
11
-Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
12
- arch/x86/entry/calling.h         | 11 +++++++++++
13
- arch/x86/entry/entry_64_compat.S | 18 ++++++++++++++----
14
- 2 files changed, 25 insertions(+), 4 deletions(-)
15
-
16
-diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
17
-index 9a9e588..1439429 100644
18
-+++ b/arch/x86/entry/calling.h
19
-@@ -129,6 +129,17 @@ For 32-bit we have the following conventions - kernel is built with
20
- 	SAVE_C_REGS_HELPER 0, 0, 0, 1, 0
21
- 	.endm
22
- 
23
-+	.macro CLEAR_R8_TO_R15
24
-+	xorq %r15, %r15
25
-+	xorq %r14, %r14
26
-+	xorq %r13, %r13
27
-+	xorq %r12, %r12
28
-+	xorq %r11, %r11
29
-+	xorq %r10, %r10
30
-+	xorq %r9, %r9
31
-+	xorq %r8, %r8
32
-+	.endm
33
-+
34
- 	.macro SAVE_EXTRA_REGS offset=0
35
- 	movq %r15, 0*8+\offset(%rsp)
36
- 	movq %r14, 1*8+\offset(%rsp)
37
-diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
38
-index d76a976..9217245 100644
39
-+++ b/arch/x86/entry/entry_64_compat.S
40
-@@ -88,12 +88,14 @@ ENTRY(entry_SYSENTER_compat)
41
- 	pushq   $0			/* pt_regs->r11 = 0 */
42
- 	pushq   %rbx                    /* pt_regs->rbx */
43
- 	pushq   %rbp                    /* pt_regs->rbp (will be overwritten) */
44
--	pushq   $0			/* pt_regs->r12 = 0 */
45
--	pushq   $0			/* pt_regs->r13 = 0 */
46
--	pushq   $0			/* pt_regs->r14 = 0 */
47
--	pushq   $0			/* pt_regs->r15 = 0 */
48
-+	pushq   %r12                    /* pt_regs->r12 */
49
-+	pushq   %r13                    /* pt_regs->r13 */
50
-+	pushq   %r14                    /* pt_regs->r14 */
51
-+	pushq   %r15                    /* pt_regs->r15 */
52
- 	cld
53
- 
54
-+	CLEAR_R8_TO_R15
55
-+
56
- 	/*
57
- 	 * SYSENTER doesn't filter flags, so we need to clear NT and AC
58
- 	 * ourselves.  To save a few cycles, we can check whether
59
-@@ -214,10 +217,12 @@ ENTRY(entry_SYSCALL_compat)
60
- 	pushq   $0			/* pt_regs->r11 = 0 */
61
- 	pushq   %rbx                    /* pt_regs->rbx */
62
- 	pushq   %rbp                    /* pt_regs->rbp (will be overwritten) */
63
--	pushq   $0			/* pt_regs->r12 = 0 */
64
--	pushq   $0			/* pt_regs->r13 = 0 */
65
--	pushq   $0			/* pt_regs->r14 = 0 */
66
--	pushq   $0			/* pt_regs->r15 = 0 */
67
-+	pushq   %r12                    /* pt_regs->r12 */
68
-+	pushq   %r13                    /* pt_regs->r13 */
69
-+	pushq   %r14                    /* pt_regs->r14 */
70
-+	pushq   %r15                    /* pt_regs->r15 */
71
-+
72
-+	CLEAR_R8_TO_R15
73
- 
74
- 	/*
75
- 	 * User mode is traced as though IRQs are on, and SYSENTER
76
-@@ -234,6 +238,10 @@ ENTRY(entry_SYSCALL_compat)
77
- 	/* Opportunistic SYSRET */
78
- sysret32_from_system_call:
79
- 	TRACE_IRQS_ON			/* User mode traces as IRQs on. */
80
-+	movq    R15(%rsp), %r15         /* pt_regs->r15 */
81
-+	movq    R14(%rsp), %r14         /* pt_regs->r14 */
82
-+	movq    R13(%rsp), %r13         /* pt_regs->r13 */
83
-+	movq    R12(%rsp), %r12         /* pt_regs->r12 */
84
- 	movq	RBX(%rsp), %rbx		/* pt_regs->rbx */
85
- 	movq	RBP(%rsp), %rbp		/* pt_regs->rbp */
86
- 	movq	EFLAGS(%rsp), %r11	/* pt_regs->flags (in r11) */
87
-@@ -331,6 +339,8 @@ ENTRY(entry_INT80_compat)
88
- 	pushq   %r15                    /* pt_regs->r15 */
89
- 	cld
90
- 
91
-+	CLEAR_R8_TO_R15
92
-+
93
- 	/*
94
- 	 * User mode is traced as though IRQs are on, and the interrupt
95
- 	 * gate turned them off.
96
-2.9.5
97
-