From 274b45a4c33ad1b673b3e010ea596fc915adc4ceea9c600fc7319fa341e35940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 8 Feb 2016 16:17:25 +0000 Subject: [PATCH] Accepting request 358382 from home:favogt:branches:Base:System Add the third patch from the series as well, for completeness. This fixes a crash that could theoretically happen if the font in the initrd can't be read. Correct patch this time :-) OBS-URL: https://build.opensuse.org/request/show/358382 OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=171 --- 0003-fix_null_deref.patch | 34 ++++++++++++++++++++++++++++++++++ plymouth.changes | 6 ++++++ plymouth.spec | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 0003-fix_null_deref.patch diff --git a/0003-fix_null_deref.patch b/0003-fix_null_deref.patch new file mode 100644 index 0000000..931b24d --- /dev/null +++ b/0003-fix_null_deref.patch @@ -0,0 +1,34 @@ +From 99ee02fe20ae53323fe5756416e6a7d96a3baf8a Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 21 Jan 2016 10:39:21 +0100 +Subject: [PATCH 1/3] ply-label: Don't crash if label plugin fails + +The label plugin's create_control function can return NULL if allocation +failed, for example, but ply-label.c ignores that and uses the NULL control, +causing various SEGVs. + +Signed-off-by: Fabian Vogt +--- + src/libply-splash-graphics/ply-label.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: plymouth-0.9.2/src/libply-splash-graphics/ply-label.c +=================================================================== +--- plymouth-0.9.2.orig/src/libply-splash-graphics/ply-label.c ++++ plymouth-0.9.2/src/libply-splash-graphics/ply-label.c +@@ -130,6 +130,15 @@ ply_label_load_plugin (ply_label_t *labe + + label->control = label->plugin_interface->create_control (); + ++ if (label->control == NULL) { ++ ply_save_errno (); ++ label->plugin_interface = NULL; ++ ply_close_module (label->module_handle); ++ label->module_handle = NULL; ++ ply_restore_errno (); ++ return false; ++ } ++ + if (label->text != NULL) + label->plugin_interface->set_text_for_control (label->control, + label->text); diff --git a/plymouth.changes b/plymouth.changes index c2528fe..0fa0353 100644 --- a/plymouth.changes +++ b/plymouth.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 8 15:00:06 UTC 2016 - fvogt@suse.com + +- Add 0003-fix_null_deref.patch as well + - Avoid potential SEGV if label plugin fails to load + ------------------------------------------------------------------- Wed Jan 20 13:14:31 UTC 2016 - fvogt@suse.com diff --git a/plymouth.spec b/plymouth.spec index ed3e425..71c9ead 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -53,6 +53,7 @@ Patch29: 0001-let-it-become-a-real-daemon.patch # PATCH-FIX-UPSTREAM 0001-Add-label-ft-plugin.patch fvogt@suse.com -- add ability to output text in initrd Patch30: 0001-Add-label-ft-plugin.patch Patch31: 0002-Install-label-ft-plugin-into-initrd-if-available.patch +Patch32: 0003-fix_null_deref.patch BuildRequires: automake BuildRequires: docbook-xsl-stylesheets @@ -354,6 +355,7 @@ plugin. %patch29 -p1 %patch30 -p1 %patch31 -p1 +%patch32 -p1 # replace builddate with patch0date sed -i "s/__DATE__/\"$(stat -c %y %{_sourcedir}/%{name}.changes)\"/" src/main.c