From ed3fcaae11da24270b7b4a7c73be288ec86e4e0a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 20 Nov 2025 14:43:41 +0100 Subject: [PATCH] crash-handler: also disable dlopen(), just in case --- src/core/crash-handler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/crash-handler.c b/src/core/crash-handler.c index 124d4b886b4..495e9efc9b5 100644 --- a/src/core/crash-handler.c +++ b/src/core/crash-handler.c @@ -7,6 +7,7 @@ #include "constants.h" #include "crash-handler.h" +#include "dlfcn-util.h" #include "exit-status.h" #include "format-util.h" #include "log.h" @@ -70,6 +71,9 @@ _noreturn_ static void crash(int sig, siginfo_t *siginfo, void *context) { * memory allocation is not async-signal-safe anyway — see signal-safety(7) for details —, and thus * is not permissible in signal handlers.) */ + block_dlopen(); /* paranoia: never end up doing dlopen() as side-effect from some call anymore from + * here */ + if (getpid_cached() != 1) /* Pass this on immediately, if this is not PID 1 */ propagate_signal(sig, siginfo); -- 2.47.3