mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 08:52:07 +01:00
We use ___setjmp (non-signal saving) to setup a signal frame. When
adding a signal frame to a thread, be sure to label the context correctly so we don't restore an uninitialized process mask. Reported by: kimc@W8HD.ORG and Andrey Rouskol <anry@sovintel.ru>
This commit is contained in:
parent
f90e81f97b
commit
2fbba8b1b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67444
@ -1046,7 +1046,7 @@ thread_sigframe_add(pthread_t thread, int sig)
|
||||
(struct pthread_signal_frame *) stackp;
|
||||
thread->curframe = thread->sigframes[thread->sigframe_count];
|
||||
thread->curframe->stackp = stackp;
|
||||
thread->curframe->ctxtype = CTX_JB;
|
||||
thread->curframe->ctxtype = CTX_JB_NOSIG;
|
||||
thread->curframe->longjmp_val = 1;
|
||||
thread->curframe->signo = sig;
|
||||
|
||||
|
@ -1046,7 +1046,7 @@ thread_sigframe_add(pthread_t thread, int sig)
|
||||
(struct pthread_signal_frame *) stackp;
|
||||
thread->curframe = thread->sigframes[thread->sigframe_count];
|
||||
thread->curframe->stackp = stackp;
|
||||
thread->curframe->ctxtype = CTX_JB;
|
||||
thread->curframe->ctxtype = CTX_JB_NOSIG;
|
||||
thread->curframe->longjmp_val = 1;
|
||||
thread->curframe->signo = sig;
|
||||
|
||||
|
@ -1046,7 +1046,7 @@ thread_sigframe_add(pthread_t thread, int sig)
|
||||
(struct pthread_signal_frame *) stackp;
|
||||
thread->curframe = thread->sigframes[thread->sigframe_count];
|
||||
thread->curframe->stackp = stackp;
|
||||
thread->curframe->ctxtype = CTX_JB;
|
||||
thread->curframe->ctxtype = CTX_JB_NOSIG;
|
||||
thread->curframe->longjmp_val = 1;
|
||||
thread->curframe->signo = sig;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user