!72 Fix double free for SIGUSR1
From: @yixiangzhike Reviewed-by: @HuaxinLuGitee Signed-off-by: @HuaxinLuGitee
This commit is contained in:
commit
a18343bf7a
@ -2,7 +2,7 @@
|
||||
|
||||
Name: aide
|
||||
Version: 0.17.4
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: Advanced Intrusion Detection Environment
|
||||
License: GPLv2+
|
||||
URL: http://sourceforge.net/projects/aide
|
||||
@ -27,6 +27,7 @@ Patch2: backport-Fix-handling-of-duplicate-database-entries.patch
|
||||
Patch3: backport-Switch-from-PCRE-to-PCRE2-closes-116.patch
|
||||
Patch4: backport-Fix-condition-for-error-message-of-failing-to-open-g.patch
|
||||
Patch5: backport-Use-signal-safe-write-function-in-signal-handler.patch
|
||||
Patch6: backport-Handle-SIGUSR1-only-after-config-parsing.patch
|
||||
|
||||
%description
|
||||
AIDE (Advanced Intrusion Detection Environment, [eyd]) is a file and directory integrity checker.
|
||||
@ -82,6 +83,12 @@ make check
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 17 2025 yixiangzhike <yixiangzhike007@163.com> - 0.17.4-6
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: backport upstream patch to fix double free for SIGUSR1
|
||||
|
||||
* Thu Jan 9 2025 yixiangzhike <yixiangzhike007@163.com> - 0.17.4-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
52
backport-Handle-SIGUSR1-only-after-config-parsing.patch
Normal file
52
backport-Handle-SIGUSR1-only-after-config-parsing.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 04b51aa49461a2e762a7d363cabcd73718023250 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes von Haugwitz <hannes@vonhaugwitz.com>
|
||||
Date: Tue, 25 Mar 2025 19:19:37 +0100
|
||||
Subject: [PATCH] Handle SIGUSR1 only after config parsing
|
||||
|
||||
* closes: #181
|
||||
---
|
||||
src/aide.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/aide.c b/src/aide.c
|
||||
index e935794..beb8c01 100644
|
||||
--- a/src/aide.c
|
||||
+++ b/src/aide.c
|
||||
@@ -91,14 +91,11 @@ static void usage(int exitvalue)
|
||||
|
||||
static void sig_handler(int);
|
||||
|
||||
-static void init_sighandler()
|
||||
+static void init_db_sighandler()
|
||||
{
|
||||
signal(SIGBUS,sig_handler);
|
||||
signal(SIGTERM,sig_handler);
|
||||
- signal(SIGUSR1,sig_handler);
|
||||
signal(SIGHUP,sig_handler);
|
||||
-
|
||||
- return;
|
||||
}
|
||||
|
||||
static void sig_handler(int signum)
|
||||
@@ -557,7 +554,7 @@ int main(int argc,char**argv)
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
umask(0177);
|
||||
- init_sighandler();
|
||||
+ init_db_sighandler();
|
||||
|
||||
setdefaults_before_config();
|
||||
|
||||
@@ -584,6 +581,9 @@ int main(int argc,char**argv)
|
||||
|
||||
setdefaults_after_config();
|
||||
|
||||
+ log_msg(LOG_LEVEL_DEBUG, "initialize signal handler for SIGUSR1");
|
||||
+ signal(SIGUSR1,sig_handler);
|
||||
+
|
||||
log_msg(LOG_LEVEL_CONFIG, "report_urls:");
|
||||
log_report_urls(LOG_LEVEL_CONFIG);
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user