summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/cve/4.9.x.scc3
-rw-r--r--patches/cve/CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch37
2 files changed, 40 insertions, 0 deletions
diff --git a/patches/cve/4.9.x.scc b/patches/cve/4.9.x.scc
index 51591c7..d1e56d9 100644
--- a/patches/cve/4.9.x.scc
+++ b/patches/cve/4.9.x.scc
@@ -5,3 +5,6 @@ patch CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
5#CVEs fixed in 4.9.88: 5#CVEs fixed in 4.9.88:
6patch CVE-2018-1065-netfilter-add-back-stackpointer-size-checks.patch 6patch CVE-2018-1065-netfilter-add-back-stackpointer-size-checks.patch
7patch CVE-2018-1068-netfilter-ebtables-CONFIG_COMPAT-don-t-trust-userlan.patch 7patch CVE-2018-1068-netfilter-ebtables-CONFIG_COMPAT-don-t-trust-userlan.patch
8
9#CVEs fixed in 4.9.89:
10patch CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch
diff --git a/patches/cve/CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch b/patches/cve/CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch
new file mode 100644
index 0000000..6da5d3a
--- /dev/null
+++ b/patches/cve/CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch
@@ -0,0 +1,37 @@
1From 9b54d816e00425c3a517514e0d677bb3cec49258 Mon Sep 17 00:00:00 2001
2From: Hou Tao <houtao1@huawei.com>
3Date: Fri, 3 Feb 2017 17:19:07 +0800
4Subject: [PATCH] blkcg: fix double free of new_blkg in blkcg_init_queue
5
6If blkg_create fails, new_blkg passed as an argument will
7be freed by blkg_create, so there is no need to free it again.
8
9CVE: CVE-2018-7480
10Upstream-Status: Backport
11
12Signed-off-by: Hou Tao <houtao1@huawei.com>
13Signed-off-by: Jens Axboe <axboe@fb.com>
14Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
15---
16 block/blk-cgroup.c | 4 +---
17 1 file changed, 1 insertion(+), 3 deletions(-)
18
19diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
20index 37fe595..295e98c2 100644
21--- a/block/blk-cgroup.c
22+++ b/block/blk-cgroup.c
23@@ -1079,10 +1079,8 @@ int blkcg_init_queue(struct request_queue *q)
24 if (preloaded)
25 radix_tree_preload_end();
26
27- if (IS_ERR(blkg)) {
28- blkg_free(new_blkg);
29+ if (IS_ERR(blkg))
30 return PTR_ERR(blkg);
31- }
32
33 q->root_blkg = blkg;
34 q->root_rl.blkg = blkg;
35--
362.7.4
37