summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-01-16 12:51:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-02 11:05:59 +0000
commitccae89188966c9162782c6eb3ede9572c3683c5c (patch)
tree5c5f7b5e97012f9b8de71a44306ab0cec200d6ec /meta/recipes-core/util-linux
parent8b0640c4aea2f012bd2204f324f1993959303a7e (diff)
downloadpoky-ccae89188966c9162782c6eb3ede9572c3683c5c.tar.gz
util-linux: remove erroneous patch (qsort_r)
The patch in question is patching the code to use qsort() instead of qsort_r(), without adopting the compare function. This is a major issue, because the compare function as written is evaluating / accessing a third argument, which is not passed with this OE patch, causing access to random memory. Given this patch was added so as to support (old) linux (host) distros which might not provide qsort_r(), according to the git history, and given these days util-linux detects availability of qsort_r() during configure phase, and given musl builds (which doesn't provide qsort_r() either) work without problem, the right solution is to simply drop this invalid patch. Do so. (From OE-Core rev: a85f93b4265a20b269085d12326e32915c561e62) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch33
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.32.1.bb6
2 files changed, 0 insertions, 39 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
deleted file mode 100644
index 68bf22de8c..0000000000
--- a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Wed, 26 Mar 2014 01:30:29 +0000
4Subject: [PATCH] sun.c: use qsort() to instead of qsort_r()
5
6qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
7the host like CentOS 5.x.
8
9Upstream-Status: Inappropriate [Other]
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12---
13 libfdisk/src/sun.c | 5 ++---
14 1 file changed, 2 insertions(+), 3 deletions(-)
15
16Index: util-linux-2.24.2/libfdisk/src/sun.c
17===================================================================
18--- util-linux-2.24.2.orig/libfdisk/src/sun.c
19+++ util-linux-2.24.2/libfdisk/src/sun.c
20@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f
21 }
22 verify_sun_starts = starts;
23
24- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
25- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
26- verify_sun_starts);
27-
28+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
29+ (int (*)(const void *,const void *)) verify_sun_cmp);
30+
31 if (array[0] == -1) {
32 fdisk_info(cxt, _("No partitions defined."));
33 return 0;
diff --git a/meta/recipes-core/util-linux/util-linux_2.32.1.bb b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
index b0492afff3..0f860c221b 100644
--- a/meta/recipes-core/util-linux/util-linux_2.32.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
@@ -1,14 +1,8 @@
1require util-linux.inc 1require util-linux.inc
2 2
3# To support older hosts, we need to patch and/or revert
4# some upstream changes. Only do this for native packages.
5OLDHOST = ""
6OLDHOST_class-native = "file://util-linux-native-qsort.patch"
7
8SRC_URI += "file://configure-sbindir.patch \ 3SRC_URI += "file://configure-sbindir.patch \
9 file://runuser.pamd \ 4 file://runuser.pamd \
10 file://runuser-l.pamd \ 5 file://runuser-l.pamd \
11 ${OLDHOST} \
12 file://ptest.patch \ 6 file://ptest.patch \
13 file://run-ptest \ 7 file://run-ptest \
14 file://display_testname_for_subtest.patch \ 8 file://display_testname_for_subtest.patch \