glibc/sysdeps/sparc/sparc64
Adhemerval Zanella bcae44ea85 elf: Only process multiple tunable once (BZ 31686)
The 680c597e9c commit made loader reject ill-formatted strings by
first tracking all set tunables and then applying them. However, it does
not take into consideration if the same tunable is set multiple times,
where parse_tunables_string appends the found tunable without checking
if it was already in the list. It leads to a stack-based buffer overflow
if the tunable is specified more than the total number of tunables.  For
instance:

  GLIBC_TUNABLES=glibc.malloc.check=2:... (repeat over the number of
  total support for different tunable).

Instead, use the index of the tunable list to get the expected tunable
entry.  Since now the initial list is zero-initialized, the compiler
might emit an extra memset and this requires some minor adjustment
on some ports.

Checked on x86_64-linux-gnu and aarch64-linux-gnu.

Reported-by: Yuto Maeda <maeda@cyberdefense.jp>
Reported-by: Yutaro Shimizu <shimizu@cyberdefense.jp>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2024-05-07 12:16:36 -03:00
..
bits login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
fpu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
multiarch Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
add_n.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
align-cpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
backtrace.h Use libgcc unwinder for sparc backtraces, if available. 2013-01-21 14:15:30 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-plt.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hp-timing.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memmove.S sparc: Fix sparc64 memmove length comparison (BZ 31266) 2024-01-22 09:34:50 -03:00
memset.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthread_spin_init.c SPARC: Consolidate unnecessary nptl/ subdirectories. 2014-06-25 10:04:14 -07:00
pthread_spin_lock.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthread_spin_unlock.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthreaddef.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_add.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_cmp.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_cmpe.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_div.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_dtoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_feq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_fge.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_fgt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_fle.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_flt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_fne.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_itoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_mul.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_neg.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtod.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtoi.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtos.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtoui.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtoux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_qtox.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_sqrt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_stoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_sub.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_uitoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_util.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_uxtoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
qp_xtoq.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rtld-memcpy.c Fix sparc build. 2014-11-14 10:32:52 -08:00
rtld-memmove.c sparc: assembly version of memmove for ultra1+ 2017-12-14 08:47:09 -02:00
rtld-memset.c elf: Only process multiple tunable once (BZ 31686) 2024-05-07 12:16:36 -03:00
sfp-machine.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
start.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcspn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strpbrk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strrchr.c
strspn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sub_n.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
submul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions Remove sysdeps/sparc/sparc64/soft-fp directory. 2018-05-25 20:00:51 +00:00