Commit Graph

50 Commits (eda3da56a6847f94aaff42a493166670853b8bc6)

Author SHA1 Message Date
Paul Spooren eda3da56a6 toolchain: add PKG_RELEASE if local files
The toolchain packages partly contain local code like patches and
configuration files. These files are not tracked via PKG_VERSION as this
variable only covers the upstream package version.

To allow versioning of the buildsystem, this commit adds PKG_RELEASE:=1
to all toolchain packages with local files. Whenever a local file is
changed the release must be increased.

This does not touch binutils and gcc for now, as these provide multiple
versions within one package.

Also update the copyright of touched files to 2020.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[exclude binutils/gcc from patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Hans Dedecker f206461153 glibc: fix memcpy and memmove for negative length [BZ #25620]
6f3459f985 Add NEWS entry for CVE-2020-6096 (bug 25620)
64246fccaf arm: CVE-2020-6096: Fix multiarch memcpy for negative length [BZ #25620]
9bbd2b6172 arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Hans Dedecker a44eff6ad3 glibc: fix avx2 strncmp offset compare condition check [BZ #25933]
4e8a33a959 NEWS: Mention BZ 25933 fix
fd15ba932d Fix avx2 strncmp offset compare condition check [BZ #25933

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Ian Cooper b933f9cf0c toolchain: remove gcc libssp and use libc variant
Removes the standalone implementation of stack smashing protection
in gcc's libssp in favour of the native implementation available
in glibc and uclibc. Musl libc already uses its native ssp, so this
patch does not affect musl-based toolchains.

Stack smashing protection configuration options are now uniform
across all supported libc variants.

This also makes kernel-level stack smashing protection available
for x86_64 and i386 builds using non-musl libc.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
4 years ago
Hans Dedecker 98342b1543 glibc: update to latest 2.31 commit (BZ #25976, BZ #25824)
3a44844c97 nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976]
c839175267 aarch64: fix strcpy and strnlen for big-endian [BZ #25824]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Hans Dedecker 14f372428a glibc: update to latest 2.31 commit
1094741224 aarch64: Accept PLT calls to __getauxval within libc.so
a98b8b221c NEWS: Mention fixes for BZ 25810/25896/25902/25966
4c833bbebe x86-64: Use RDX_LP on __x86_shared_non_temporal_threshold [BZ #25966]
3b9ceb3320 NEWS: Mention bug 25639 fixed in 2.31 branch
bb44fe7711 oc_FR locale: Fix spelling of April (bug 25639)
f2ac792047 oc_FR locale: Fix spelling of Thursday (bug 25639)
18fdba553d Add a C wrapper for prctl [BZ #25896]
7c9e054afd powerpc: Rename argN to _argN in LOADARGS_N [BZ #25902]
9c5ae39a64 Add C wrappers for process_vm_readv/process_vm_writev [BZ #25810]
63c3696a4a Mark unsigned long arguments with U in more syscalls [BZ #25810]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Hauke Mehrtens a2cf87a7b1 toolchain: glibc: Define minimum support kernel version as 4.14
This will compile glibc in a way that it will only support kernel 4.14
and later. Compatibility code for older kernel versions will be removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 02c5019a35 toolchain: glibc: Update glibc to version 2.31
This updates glibc to the most recent version 2.31.

001-regex-read-overrun.patch was a backport from a more recent version
and is integrated in glibc 2.31.

050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch is needed
to add the DES crypto functions back again. They were removed in glibc
2.28, but we still use them in ppp.
musl lib also provides these DES crypto functions. Without them we would
have to link ppp against openssl or an other crypto library.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hans Dedecker 1ec6e7837e glibc: update to latest 2.27 commit (BZ #2503, BZ #2504)
bef0b1cb31 libio: Disable vtable validation for pre-2.1 interposed handles [BZ #25203]
4d5cfeb510 rtld: Check __libc_enable_secure before honoring LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]
92f04eedb5 mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Hans Dedecker 2b342d01a2 glibc: update to latest 2.27 commit (BZ#23637)
5b4f7382af Add undef to fix test failure.
9456483fb2 Improve performance of memmem
373f8b06a3 Improve performance of strstr
4ec1b9e913 Fix strstr bug with huge needles (bug 23637)
ecd6271ed8 Speedup first memmem match
bba6b9288f Simplify and speedup strstr/strcasestr first match
7a4da6ef7a Improve strstr performance

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker ba305d12de glibc: update to latest 2.27 commit (BZ #24228, BZ #24744, BZ #24699)
5f0d2e0491 [AArch64] Add ifunc support for Ares
e6b7252040 aarch64,falkor: Use vector registers for memcpy
c74b884f70 aarch64,falkor: Ignore prefetcher tagging for smaller copies
0fc5934ebd aarch64/strncmp: Use lsr instead of mov+lsr
e0a0bd3acc aarch64/strncmp: Unbreak builds with old binutils
638caf3000 aarch64: Improve strncmp for mutually misaligned inputs
d5f45a29ff aarch64/strcmp: fix misaligned loop jump target
7f690fafad aarch64: Improve strcmp unaligned performance
40df047b3b aarch64: Fix branch target to loop16
062139f233 aarch64: Optimized memcmp for medium to large sizes
f3e2add213 aarch64: Use the L() macro for labels in memcmp
22bd3ab40e posix: Fix large mmap64 offset for mips64n32 (BZ#24699)
bdd16894aa aarch64: handle STO_AARCH64_VARIANT_PCS
0b48caab9a aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS
949da7f2fd io: Remove copy_file_range emulation [BZ #24744]
f056ac8363 libio: do not attempt to free wide buffers of legacy streams [BZ #24228]
5f90e009b1 NEWS: add entries for bugs 22964, 24180, and 24531

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker f21c8577bb glibc: update to latest 2.27 commit (BZ #24531)
54ba8bcd423 Fix tcache count maximum (BZ #24531)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 5c742c86ef glibc: update to latest 2.27 commit
f9c3c12f336 Fix crash in _IO_wfile_sync (bug 20568)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 6b5346e7ed glibc: update to latest 2.27 commit (BZ #18035)
1961e5c7296 elf: Fix pldd (BZ#18035)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 8f1cbef12e glibc: update to latest 2.27 commit [BZ #22964]
de9d4aa353 ja_JP locale: Add entry for the new Japanese era [BZ #22964]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 076c11a3aa glibc: update to latest 2.27 commit
1ab314d8d3 S390: Mark vx and vxe as important hwcap.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker e3311cb138 glibc: update to latest 2.27 commit [BZ #24180]
9f44fa22cb Add compiler barriers around modifications of the robust mutex list for pthread_mutex_trylock. [BZ #24180]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 420376ab50 glibc: update to latest 2.27 commit (BZ #24155,BZ #24097)
2ebadb6451 x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155]
3a5ae8db68 x86-64 strnlen/wcsnlen: Properly handle the length parameter [BZ #24097]
2c016ffa24 x86-64 strncpy: Properly handle the length parameter [BZ #24097]
d8457edece x86-64 strncmp family: Properly handle the length parameter [BZ #24097]
55f8812858 x86-64 memset/wmemset: Properly handle the length parameter [BZ #24097]
efc3714845 x86-64 memrchr: Properly handle the length parameter [BZ #24097]
a4690969ed x86-64 memcpy: Properly handle the length parameter [BZ #24097]
6465327195 x86-64 memcmp/wmemcmp: Properly handle the length parameter [BZ #24097]
50117e00a1 x86-64 memchr/wmemchr: Properly handle the length parameter [BZ #24097]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker b3664bc702 glibc: update to latest 2.27 commit (BZ #24018)
68c2930a56 NEWS: add entries for bugs 23275, 23861, and 23907
766e8fb932 intl: Do not return NULL on asprintf failure in gettext [BZ #24018]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker e9e63c5a9a glibc: update to latest 2.27 commit (BZ #24027, BZ #23927)
3981fc3453 malloc: Always call memcpy in _int_realloc [BZ #24027]
f6d0e8c36f Fix rwlock stall with PREFER_WRITER_NONRECURSIVE_NP (bug 23861)
2794474c65 powerpc: Add missing CFI register information (bug #23614)
d8ca7a0c71 Fix _dl_profile_fixup data-dependency issue (Bug 23690)
f1e211096b inet/tst-if_index-long: New test case for CVE-2018-19591 [BZ #23927]
4e9f34e54f support: Implement <support/descriptors.h> to track file descriptors
e75481a7a7 support: Close original descriptors in support_capture_subprocess
0f79dc0be3 support_quote_string: Do not use str parameter name
6b2dd53aa0 support: Implement support_quote_string
50477165b9 malloc: Add another test for tcache double free check.
4b246928bd malloc: tcache double free check

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker a969e96e47 glibc: update to latest 2.27 commit (BZ #23927)
f6d0e8c36f Fix rwlock stall with PREFER_WRITER_NONRECURSIVE_NP (bug 23861)
2794474c65 powerpc: Add missing CFI register information (bug #23614)
d8ca7a0c71 Fix _dl_profile_fixup data-dependency issue (Bug 23690)
f1e211096b inet/tst-if_index-long: New test case for CVE-2018-19591 [BZ #23927]
4e9f34e54f support: Implement <support/descriptors.h> to track file descriptors
e75481a7a7 support: Close original descriptors in support_capture_subprocess
0f79dc0be3 support_quote_string: Do not use str parameter name
6b2dd53aa0 support: Implement support_quote_string
50477165b9 malloc: Add another test for tcache double free check.
4b246928bd malloc: tcache double free check

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 476336fe66 glibc: update to latest 2.27 commit (BZ #23927)
9f433fc791 CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name [BZ #23927]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hans Dedecker 1dcaef8410 glibc: update to latest 2.27 commit
1517dfb8aa Add an additional test to resolv/tst-resolv-network.c
1050634904 libanl: properly cleanup if first helper thread creation failed (bug 22927)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 69734416d2 glibc: update to latest 2.27 commit (BZ#23709,BZ#23822)
d8eee5ef55 x86: Fix Haswell CPU string flags (BZ#23709)
5cd5309d91 i64: fix missing exp2f, log2f and powf symbols in libm.a [BZ #23822]
1759ea197b conform: XFAIL siginfo_t si_band test on sparc64

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 70315fe144 glibc: update to latest 2.27 commit (BZ #23562, BZ #23275)
77b4b8231e signal: Use correct type for si_band in siginfo_t [BZ #23562]
5bdb6897fc Fix race in pthread_mutex_lock while promoting to PTHREAD_MUTEX_ELISION_NP [BZ #23275]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 79982b26bb toolchain/glibc: update to 2.27+
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 24d82c2e5c toolchain/glibc: update to latest 2.26 commit
c5c90b480e Fix segfault in maybe_script_execute.
174709d879 pthread_cond_broadcast: Fix waiters-after-spinning case [BZ #23538]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 7402cc7160 toolchain/glibc: update to latest 2.26 commit
c9570bd2f5 x86: Populate COMMON_CPUID_INDEX_80000001 for Intel CPUs [BZ #23459]
86e0996b1a x86: Correct index_cpu_LZCNT [BZ #23456]
cf6deb084b conform/conformtest.pl: Escape literal braces in regular expressions
b12bed3e06 stdio-common/tst-printf.c: Remove part under a non-free license [BZ #23363]
20dc7a909a libio: Add tst-vtables, tst-vtables-interposed
4b10e69b1f Synchronize support/ infrastructure with master
762e9d63d5 NEWS: Reorder out-of-order bugs
2781bd5a86 libio: Disable vtable validation in case of interposition [BZ #23313]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker e705342bf8 toolchain/glibc: update to latest 2.26 commit
74d16a57a3 Check length of ifname before copying it into to ifreq structure.
3aaf8bda00 getifaddrs: Don't return ifa entries with NULL names [BZ #21812]
f958b45d52 Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349]
81b994bd83 Fix parameter type in C++ version of iseqsig (bug 23171)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker c22117a791 toolchain/glibc: update to latest 2.26 commit
7b52c8ae05 libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236]

Refresh patches

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker a70a0a529f toolchain/glibc: update to latest 2.26 commit
4df8479e6b Add NEWS entry for CVE-2018-11236
a5bc5ec967 Add references to CVE-2018-11236, CVE-2017-18269
58ad5f8a64 Add a test case for [BZ #23196]
6b4362f2cb Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 43d70a7a9d toolchain/glibc: update to latest 2.26 commit
af7519f7b3 Fix path length overflow in realpath [BZ #22786]
365722ace6 Fix stack overflow with huge PT_NOTE segment [BZ #20419]
be056fae3b Fix blocking pthread_join. [BZ #23137]
02f0dd83a4 Fix signed integer overflow in random_r (bug 17343).
3241353ab2 i386: Fix i386 sigaction sa_restorer initialization (BZ#21269)
677e6d13e0 [BZ #22342] Fix netgroup cache keys.
71d339cb86 Fix i386 memmove issue (bug 22644).
31e2d15b80 Fix crash in resolver on memory allocation failure (bug 23005)
1f7c4748d6 getlogin_r: return early when linux sentinel value is set
7e7a5f0bcd resolv: Fully initialize struct mmsghdr in send_dg [BZ #23037]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Johann Neuhauser 0370293cf3 glibc: switch from git to https
This is needed for working behind a http proxy.

Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.de>
6 years ago
Hyeonsik Song 594dbaa262 toolchain/glibc: unset LD_LIBRARY_PATH
Fix build error when use glibc

Signed-off-by: Hyeonsik Song <blogcin@naver.com>
6 years ago
Hans Dedecker 50433f313f glibc: update glibc to 2.26+ and switch to download from git
Switch glibc to 2.26+ [0] and download the sources from git which will it
make easier to update glibc in the future.

For an overview of the fixed bugs and CVE related fixes in 2.26+ see the
NEWS file [1]

[0] https://sourceware.org/git/?p=glibc.git;a=commit;h=d300041c533a3d837c9f37a099bcc95466860e98
[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=410f0d163145c1549fb73fdd96568f585b5bf62f;hb=refs/heads/release/2.26/master

Signed-off-by: Xinxing Hu <xinxing.huchn@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Hans Dedecker 3dee117a8a glibc: fix applying of patches
Commit f4d9d7a removed support for version specific patches; but it also
broke applying of patches in the patches glibc dir.
Fix the issue by setting PATCH_DIR to $(PATH_PREFIX)/patches similar as
musl/common.mk.

Signed-off-by: Xinxing Hu <xinxing.huchn@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years ago
Daniel Engberg a7e4aec3d9 toolchain/glibc: Update to 2.26
Update glibc to 2.26

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years ago
Felix Fietkau 6c6167621f glibc: update to version 2.25
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f4d9d7a26b glibc: use default PATCH_DIR
Version configuration is gone, so version specific patch directories are
not necessary either.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 38fcd2a865 build: remove libc version config code
We only support one version per libc type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 4badb8a023 glibc: switch to 2.24 by default and remove old versions, fixes security issues
2.24 fixes the following CVEs compared to 2.23:
- CVE-2016-3075
- CVE-2016-3706
- CVE-2016-1234
- CVE-2016-4429
- CVE-2016-5417

CVEs fixed in 2.23:
- CVE-2015-8776
- CVE-2015-8777
- CVE-2015-8778
- CVE-2015-8779
- CVE-2014-9761
- CVE-2015-7547

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Dirk Neukirchen bf604f3503 glibc: add 2.24
since eglibc is deprecated just use glibc as name

- fix build errors w. stack-protector (observed for x86_64):
libresolv_pic.a(gethnamaddr.os): In function `addrsort':
gethnamaddr.c:(.text+0x425): undefined reference to `__stack_chk_guard'

by additionally setting libc_cv_ssp_strong=no
like previously libc_cv_ssp=no was set

- fix compile errors on 2.24 x86 introduced by
upstream changesets "Optimize i386 syscall inlining"

errors are like:
- https://sourceware.org/ml/libc-alpha/2015-10/msg00745.html
and trying to fix with the whats suggested at:
https://patchwork.openembedded.org/patch/118909/
leads to other error:
gcc6: elf/librtld.os: In function `__mmap':
(.text+0x131a9): undefined reference to `__libc_do_syscall'
or:
gcc5: elf/dl-load.os
{standard input}: Assembler messages:
{standard input}:5129: Error: symbol `__x86.get_pc_thunk.cx' is already defined

instead of testing other flags/effects (-fno-omit-frame-pointer)
just use -O2 (like buildroot does) instead of -Os

boot+pings tested on:
qemu malta (le+be) (gcc5+bin2.25.1)
qemu aarch64 (gcc5+bin2.25.1)
qemu x86_64 (gcc6+bin2.26)
qemu x86 generic (gcc6+bin2.26)

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
8 years ago
Felix Fietkau 64da662a88 toolchain/glibc: remove obsolete versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48780
8 years ago
Jo-Philipp Wich 5445a2ee1d toolchain: use latest glibc 2.21 and 2.22 revisions
Refresh patches and rework Makefile to fetch glibc from release branches
instead of relying on tarballs.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48735
8 years ago
Felix Fietkau 3e9d2a847b glibc: switch to downloading version 2.22 via tarball instead of git to improve mirror support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48556
8 years ago
Felix Fietkau 1981ee7d75 toolchain: Reverse glibc/eglibc conditionals to check for eglibc
This will make adding future glibc versions easier because the
conditionals won't have to be modified again.

Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48399
8 years ago
Felix Fietkau f6e4badfe4 toolchain: Add glibc 2.22
Signed-off-by: Michael Marley <michael@michaelmarley.com>

SVN-Revision: 48383
8 years ago
Felix Fietkau 2efb6be426 toolchain/glibc: remove broken eglibc 2.15 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44976
9 years ago
John Crispin 3e2f578353 toolchain: The glorious return of glibc, ver 2.21
It's the eglibc packaging with a bit of spit-polishing. And testing. :-)

[blogic: merged glibc and eglibc into 1 and made eglibc a glibc variant]

Signed-off-by: Jeff Waugh <jdub@bethesignal.org>
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44701
9 years ago