mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
core/glibc to 2.18-9
This commit is contained in:
parent
7fd4226936
commit
2ad52f6bcb
3 changed files with 92 additions and 5 deletions
|
@ -16,7 +16,7 @@ noautobuild=1
|
|||
|
||||
pkgname=glibc
|
||||
pkgver=2.18
|
||||
pkgrel=8
|
||||
pkgrel=9
|
||||
pkgdesc="GNU C Library"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.gnu.org/software/libc"
|
||||
|
@ -36,6 +36,8 @@ source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
|
|||
glibc-2.18-strcoll-CVE-2012-4412+4424.patch
|
||||
glibc-2.18-strstr-hackfix.patch
|
||||
glibc-2.18-ptr-mangle-CVE-2013-4788.patch
|
||||
glibc-2.18-getaddrinfo-CVE-2013-4458.patch
|
||||
glibc-2.18-getaddrinfo-assertion.patch
|
||||
local-soname-hack.diff
|
||||
fix-hf-ld.so.cache.patch
|
||||
nscd.service
|
||||
|
@ -49,6 +51,8 @@ md5sums=('88fbbceafee809e82efd52efa1e3c58f'
|
|||
'b79561ab9dce900e9bbeaf0d49927c2b'
|
||||
'c7264b99d0f7e51922a4d3126182c40a'
|
||||
'9749ba386b08a8fe53e7ecede9bf2dfb'
|
||||
'71329fccb8eb583fb0d67b55f1e8df68'
|
||||
'd4d86add33f22125777e0ecff06bc9bb'
|
||||
'4441f6dfe7d75ced1fa75e54dd21d36e'
|
||||
'589d79041aa767a5179eaa4e2737dd3f'
|
||||
'ad8a9af15ab7eeaa23dc7ee85024af9f'
|
||||
|
@ -70,12 +74,16 @@ prepare() {
|
|||
patch -p1 -i $srcdir/glibc-2.18-malloc-corrupt-CVE-2013-4332.patch
|
||||
|
||||
# upstream commits 1326ba1a, 141f3a77 and 303e567a
|
||||
# https://sourceware.org/ml/libc-alpha/2013-08/msg00394.html
|
||||
# https://sourceware.org/ml/libc-alpha/2013-08/msg00462.html
|
||||
patch -p1 -i $srcdir/glibc-2.18-strcoll-CVE-2012-4412+4424.patch
|
||||
|
||||
# upstream commits c61b4d41 and 0b1f8e35
|
||||
patch -p1 -i $srcdir/glibc-2.18-ptr-mangle-CVE-2013-4788.patch
|
||||
|
||||
# upstream commit 7cbcdb36
|
||||
patch -p1 -i $srcdir/glibc-2.18-getaddrinfo-CVE-2013-4458.patch
|
||||
|
||||
# upstream commit 894f3f10
|
||||
patch -p1 -i $srcdir/glibc-2.18-getaddrinfo-assertion.patch
|
||||
|
||||
# hack fix for strstr issues on x86
|
||||
patch -p1 -i $srcdir/glibc-2.18-strstr-hackfix.patch
|
||||
|
@ -165,9 +173,8 @@ package() {
|
|||
${srcdir}/glibc-${pkgver}/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
|
||||
|
||||
# remove the static libraries that have a shared counterpart
|
||||
cd $pkgdir/usr/lib
|
||||
# note: keep libc, libdl, libm, libpthread for binutils testsuite
|
||||
rm lib{anl,BrokenLocale,crypt,nsl,resolv,rt,util}.a
|
||||
rm $pkgdir/usr/lib/lib{anl,BrokenLocale,crypt,nsl,resolv,rt,util}.a
|
||||
|
||||
# ALARM: symlink ld-linux.so.3 for hard-float
|
||||
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && ln -s /lib/ld-${pkgver}.so ${pkgdir}/usr/lib/ld-linux.so.3
|
||||
|
|
41
core/glibc/glibc-2.18-getaddrinfo-CVE-2013-4458.patch
Normal file
41
core/glibc/glibc-2.18-getaddrinfo-CVE-2013-4458.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
|
||||
index e6ce4cf..8ff74b4 100644
|
||||
--- a/sysdeps/posix/getaddrinfo.c
|
||||
+++ b/sysdeps/posix/getaddrinfo.c
|
||||
@@ -197,7 +197,22 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
|
||||
&rc, &herrno, NULL, &localcanon)); \
|
||||
if (rc != ERANGE || herrno != NETDB_INTERNAL) \
|
||||
break; \
|
||||
- tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); \
|
||||
+ if (!malloc_tmpbuf && __libc_use_alloca (alloca_used + 2 * tmpbuflen)) \
|
||||
+ tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen, 2 * tmpbuflen, \
|
||||
+ alloca_used); \
|
||||
+ else \
|
||||
+ { \
|
||||
+ char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL, \
|
||||
+ 2 * tmpbuflen); \
|
||||
+ if (newp == NULL) \
|
||||
+ { \
|
||||
+ result = -EAI_MEMORY; \
|
||||
+ goto free_and_return; \
|
||||
+ } \
|
||||
+ tmpbuf = newp; \
|
||||
+ malloc_tmpbuf = true; \
|
||||
+ tmpbuflen = 2 * tmpbuflen; \
|
||||
+ } \
|
||||
} \
|
||||
if (status == NSS_STATUS_SUCCESS && rc == 0) \
|
||||
h = &th; \
|
||||
@@ -209,7 +224,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
|
||||
{ \
|
||||
__set_h_errno (herrno); \
|
||||
_res.options |= old_res_options & RES_USE_INET6; \
|
||||
- return -EAI_SYSTEM; \
|
||||
+ result = -EAI_SYSTEM; \
|
||||
+ goto free_and_return; \
|
||||
} \
|
||||
if (herrno == TRY_AGAIN) \
|
||||
no_data = EAI_AGAIN; \
|
||||
--
|
||||
1.8.4.1
|
||||
|
39
core/glibc/glibc-2.18-getaddrinfo-assertion.patch
Normal file
39
core/glibc/glibc-2.18-getaddrinfo-assertion.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
|
||||
index 0f4b885..e6ce4cf 100644
|
||||
--- a/sysdeps/posix/getaddrinfo.c
|
||||
+++ b/sysdeps/posix/getaddrinfo.c
|
||||
@@ -1666,13 +1666,13 @@ rfc3484_sort (const void *p1, const void *p2, void *arg)
|
||||
|
||||
/* Fill in the results in all the records. */
|
||||
for (int i = 0; i < src->nresults; ++i)
|
||||
- if (src->results[i].index == a1_index)
|
||||
+ if (a1_index != -1 && src->results[i].index == a1_index)
|
||||
{
|
||||
assert (src->results[i].native == -1
|
||||
|| src->results[i].native == a1_native);
|
||||
src->results[i].native = a1_native;
|
||||
}
|
||||
- else if (src->results[i].index == a2_index)
|
||||
+ else if (a2_index != -1 && src->results[i].index == a2_index)
|
||||
{
|
||||
assert (src->results[i].native == -1
|
||||
|| src->results[i].native == a2_native);
|
||||
@@ -2532,7 +2532,14 @@ getaddrinfo (const char *name, const char *service,
|
||||
tmp.addr[0] = 0;
|
||||
tmp.addr[1] = 0;
|
||||
tmp.addr[2] = htonl (0xffff);
|
||||
- tmp.addr[3] = sinp->sin_addr.s_addr;
|
||||
+ /* Special case for lo interface, the source address
|
||||
+ being possibly different than the interface
|
||||
+ address. */
|
||||
+ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
|
||||
+ == 0x7f000000)
|
||||
+ tmp.addr[3] = htonl(0x7f000001);
|
||||
+ else
|
||||
+ tmp.addr[3] = sinp->sin_addr.s_addr;
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
1.8.4.1
|
||||
|
Loading…
Reference in a new issue