[PATCH] s390: Load stackpointer once in ____longjmp_chk. [BZ #34622]
Stefan Liebler
stli@linux.ibm.com
Fri Sep 25 08:42:01 GMT 2026
On 9/21/26 09:43, Stefan Liebler wrote:
> On 9/10/26 16:26, Stefan Liebler wrote:
>> The stack-pointer is reloaded from jmpbuf after validated via CHECK_SP.
>> Thus there is a short race where a concurrent writer could write a
>> manipulated stack-pointer to the jmpbuf while the check in CHECK_SP
>> does not fail.
>>
>> This patch now loads and demangles the stack-pointer (and the return
>> address) once. In case of ____longjmp_chk it is passed to CHECK_SP.
>> And afterwards it is passed to the inline assembly restoring the
>> jmp_buf. This also simplifies the two longjmp-probes.
>> ---
>> sysdeps/s390/__longjmp.c | 49 ++++++-------------
>> .../unix/sysv/linux/s390/____longjmp_chk.c | 5 +-
>> 2 files changed, 15 insertions(+), 39 deletions(-)
>> Ping.
>
> If nobody opposes, I will commit this patch end of this week.
>
> Bye,
> Stefan
Committed and closed the bugzilla.
Bye,
Stefan
More information about the Libc-alpha
mailing list