commit:     57ae9d389abac8b9ed262673172e5212dbe11dbc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 09:52:16 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun May 26 09:52:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57ae9d38

sys-apps/util-linux: Fixed heap-use-after-free in lsblk

Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...ux-2.34_rc1-lsblk_fix_heap_use_after_free.patch | 23 ++++++++++++++++++++++
 sys-apps/util-linux/util-linux-2.34_rc1.ebuild     |  1 +
 2 files changed, 24 insertions(+)

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 00000000000..41291205c5a
--- /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 <[email protected]>
+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 <[email protected]>
+---
+ 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 b222e422b0f..e45b41732ad 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
 )
 

Reply via email to