]>
Commit | Line | Data |
---|---|---|
035dbe67 FG |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Elena Reshetova <elena.reshetova@intel.com> | |
3 | Date: Mon, 4 Sep 2017 13:11:52 +0300 | |
4 | Subject: [PATCH] userns: prevent speculative execution | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | CVE-2017-5753 | |
10 | CVE-2017-5715 | |
11 | ||
12 | Real commit text tbd | |
13 | ||
14 | Signed-off-by: Elena Reshetova <elena.reshetova@intel.com> | |
15 | Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> | |
16 | Signed-off-by: Andy Whitcroft <apw@canonical.com> | |
17 | Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> | |
18 | (cherry picked from commit 1410678db6238e625775f7108c68a9e5b8d439a1) | |
19 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
20 | --- | |
21 | kernel/user_namespace.c | 4 +++- | |
22 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
23 | ||
24 | diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c | |
25 | index 4eacf186f5bc..684cc69d431c 100644 | |
26 | --- a/kernel/user_namespace.c | |
27 | +++ b/kernel/user_namespace.c | |
28 | @@ -549,8 +549,10 @@ static void *m_start(struct seq_file *seq, loff_t *ppos, | |
29 | struct uid_gid_extent *extent = NULL; | |
30 | loff_t pos = *ppos; | |
31 | ||
32 | - if (pos < map->nr_extents) | |
33 | + if (pos < map->nr_extents) { | |
34 | + gmb(); | |
35 | extent = &map->extent[pos]; | |
36 | + } | |
37 | ||
38 | return extent; | |
39 | } | |
40 | -- | |
41 | 2.14.2 | |
42 |