From 8df6e2a3f45bf4a6cef791fb3cf9fb36e34cdb30 Mon Sep 17 00:00:00 2001 From: Royyan Zahir Date: Fri, 2 Oct 2026 17:25:38 +0400 Subject: [PATCH] sched/signal: run no cleanup handlers on signal termination nxsig_abnormal_termination() popped the thread's pthread cleanup handlers in the kernel, so in the protected and kernel builds a process could get its own code called with kernel privilege by raising a fatal signal. POSIX runs cleanup handlers on pthread_exit() and on acting upon a cancellation; termination by a signal is as if by _exit(), which runs none. Signed-off-by: Royyan Zahir --- sched/signal/sig_default.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c index ecb1adf8a70..75f05cbcd1c 100644 --- a/sched/signal/sig_default.c +++ b/sched/signal/sig_default.c @@ -228,8 +228,6 @@ static void nxsig_abnormal_termination(int signo) group_kill_children(rtcb); #endif - tls_cleanup_popall(tls_get_info()); - #ifndef CONFIG_DISABLE_PTHREAD /* Check if the currently running task is actually a pthread */