Home Home > GIT Browse > SLE12-SP3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-19 23:07:17 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-19 23:07:17 +0200
commit0425490df69f0c1d23e125270b60e22e8000b880 (patch)
tree8bed4bcac3163484a1229a3eee22c6d8323cb128
parent94c3f8b187827bac2308dc9d2ca45620cf3735fd (diff)
parent5494b236698d72d8b6a808c0711204f4d2a2c8b0 (diff)
Merge branch 'users/msuchanek/cve/linux-4.4/for-next' into SLE12-SP3SLE12-SP3
-rw-r--r--patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch b/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
new file mode 100644
index 0000000000..412f1cfa75
--- /dev/null
+++ b/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
@@ -0,0 +1,40 @@
+From efa9ace68e487ddd29c2b4d6dd23242158f1f607 Mon Sep 17 00:00:00 2001
+From: Gen Zhang <blackgod016574@gmail.com>
+Date: Sun, 26 May 2019 10:42:40 +0800
+Subject: [PATCH] powerpc/pseries/dlpar: Fix a missing check in
+ dlpar_parse_cc_property()
+
+References: bsc#1137194, CVE-2019-12614
+Patch-mainline: queued
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Git-commit: efa9ace68e487ddd29c2b4d6dd23242158f1f607
+
+In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup().
+kstrdup() may return NULL, so it should be checked and handle error.
+And prop should be freed if 'prop->name' is NULL.
+
+Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/platforms/pseries/dlpar.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
+index 17958043e7f7..c852024044bb 100644
+--- a/arch/powerpc/platforms/pseries/dlpar.c
++++ b/arch/powerpc/platforms/pseries/dlpar.c
+@@ -61,6 +61,10 @@ static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa)
+
+ name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
+ prop->name = kstrdup(name, GFP_KERNEL);
++ if (!prop->name) {
++ dlpar_free_cc_property(prop);
++ return NULL;
++ }
+
+ prop->length = be32_to_cpu(ccwa->prop_length);
+ value = (char *)ccwa + be32_to_cpu(ccwa->prop_offset);
+--
+2.21.0
+
diff --git a/series.conf b/series.conf
index 20e4d86cec..b393c9720b 100644
--- a/series.conf
+++ b/series.conf
@@ -25675,6 +25675,7 @@
patches.arch/powerpc-cacheinfo-add-cacheinfo_teardown-cacheinfo_r.patch
patches.arch/powerpc-pseries-mobility-prevent-cpu-hotplug-during-.patch
patches.arch/powerpc-pseries-mobility-rebuild-cacheinfo-hierarchy.patch
+ patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
# out-of-tree patches
patches.kabi/0001-move-power_up_on_resume-flag-to-end-of-structure-for.patch