summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch23
-rw-r--r--sys-apps/util-linux/util-linux-2.34_rc1.ebuild1
2 files changed, 24 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch b/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch
new file mode 100644
index 000000000000..41291205c5a3
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch
@@ -0,0 +1,23 @@
+From f6f8a671a9a45125b6261c08b849833bce0f39a8 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Mon, 6 May 2019 12:39:07 +0200
+Subject: [PATCH] lsblk: fix heap-use-after-free
+
+Addresses: https://github.com/karelzak/util-linux/issues/787
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ misc-utils/lsblk.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index 34a6cd9ca..30d5d9b4e 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -1560,6 +1560,7 @@ static int process_all_devices(struct lsblk_devtree *tr)
+ if (is_maj_excluded(dev->maj) || !is_maj_included(dev->maj)) {
+ DBG(DEV, ul_debug(" %s: ignore (by filter)", d->d_name));
+ lsblk_devtree_remove_device(tr, dev);
++ dev = NULL;
+ goto next;
+ }
+
diff --git a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
index b222e422b0fa..e45b41732ada 100644
--- a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
@@ -64,6 +64,7 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
+ "${FILESDIR}"/${P}-lsblk_fix_heap_use_after_free.patch
"${FILESDIR}"/${P}-lscpu_floating_point_exception_fix.patch
)