diff options
-rw-r--r-- | patches/cve/4.9.x.scc | 3 | ||||
-rw-r--r-- | patches/cve/CVE-2018-7480-blkcg-fix-double-free-of-new_blkg-in-blkcg_init_queu.patch | 37 |
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: |
6 | patch CVE-2018-1065-netfilter-add-back-stackpointer-size-checks.patch | 6 | patch CVE-2018-1065-netfilter-add-back-stackpointer-size-checks.patch |
7 | patch CVE-2018-1068-netfilter-ebtables-CONFIG_COMPAT-don-t-trust-userlan.patch | 7 | patch CVE-2018-1068-netfilter-ebtables-CONFIG_COMPAT-don-t-trust-userlan.patch |
8 | |||
9 | #CVEs fixed in 4.9.89: | ||
10 | patch 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 @@ | |||
1 | From 9b54d816e00425c3a517514e0d677bb3cec49258 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hou Tao <houtao1@huawei.com> | ||
3 | Date: Fri, 3 Feb 2017 17:19:07 +0800 | ||
4 | Subject: [PATCH] blkcg: fix double free of new_blkg in blkcg_init_queue | ||
5 | |||
6 | If blkg_create fails, new_blkg passed as an argument will | ||
7 | be freed by blkg_create, so there is no need to free it again. | ||
8 | |||
9 | CVE: CVE-2018-7480 | ||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Signed-off-by: Hou Tao <houtao1@huawei.com> | ||
13 | Signed-off-by: Jens Axboe <axboe@fb.com> | ||
14 | Signed-off-by: Andreas Wellving <andreas.wellving@enea.com> | ||
15 | --- | ||
16 | block/blk-cgroup.c | 4 +--- | ||
17 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c | ||
20 | index 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 | -- | ||
36 | 2.7.4 | ||
37 | |||