This website requires JavaScript.
Explore
Help
Sign In
qiurui
/
glibc
mirror of
git://sourceware.org/git/glibc.git
Watch
1
Star
0
Fork
You've already forked glibc
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
ccf19a68ab
glibc
/
sysdeps
/
sparc
/
sparc64
/
rtld-memset.c
5 lines
89 B
C
Raw
Normal View
History
Unescape
Escape
Use generic memset/memcpy in rtld on sparcv9/sparc64. * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memset.c: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memcpy.c: New file. * sysdeps/sparc/sparc32/sparcv9/rtld-memset.c: New file. * sysdeps/sparc/sparc32/sparcv9/rtld-memcpy.c: New file. * sysdeps/sparc/sparc64/multiarch/rtld-memset.c: New file. * sysdeps/sparc/sparc64/multiarch/rtld-memcpy.c: New file. * sysdeps/sparc/sparc64/rtld-memset.c: New file. * sysdeps/sparc/sparc64/rtld-memcpy.c: New file.
2012-03-29 05:22:15 +00:00
#
include
<string/memset.c>
elf: Only process multiple tunable once (BZ 31686) The 680c597e9c3 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-06 16:18:45 +00:00
#
if IS_IN(rtld)
strong_alias
(
memset
,
__memset_ultra1
)
#
endif