about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-05 16:10:24 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-05 15:43:39 -0300
commit63295e4fda1f6dab4bf7442706fe303bf283036c (patch)
tree4d32ed1db27d531193ac7e3e30529e46e773ac75 /sysdeps/unix/sysv
parent6d1e3fb07b45e2e31e469b16cf21b24bccf8914c (diff)
downloadglibc-63295e4fda1f6dab4bf7442706fe303bf283036c.tar.gz
glibc-63295e4fda1f6dab4bf7442706fe303bf283036c.tar.xz
glibc-63295e4fda1f6dab4bf7442706fe303bf283036c.zip
arm: Remove wrong ldr from _dl_start_user (BZ 31339)
The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove
_dl_skip_args usage) removed the _SKIP_ARGS literal, which was
previously loader to r4 on loader _start.  However, the cleanup did not
remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check
to skip the arguments after ld self-relocations.

In my testing, the kernel initially set r4 to 0, which makes the
ldr instruction just read the _GLOBAL_OFFSET_TABLE_.  However, since r4
is a callee-saved register; a different runtime might not zero
initialize it and thus trigger an invalid memory access.

Checked on arm-linux-gnu.

Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit 1e25112dc0cb2515d27d8d178b1ecce778a9d37a)
Diffstat (limited to 'sysdeps/unix/sysv')
0 files changed, 0 insertions, 0 deletions