update patch code
update patch0001 Signed-off-by: hurricane618 <hurricane618@hotmail.com>
This commit is contained in:
parent
2d9657253a
commit
dfcd39671f
@ -1,37 +1,41 @@
|
||||
From 5d6a6d72e6c6d7fca825600a968ef1c12cba3c32 Mon Sep 17 00:00:00 2001
|
||||
From d9313a0248bcff9d5655d070ada674972d0c6ff8 Mon Sep 17 00:00:00 2001
|
||||
From: hurricane618 <hurricane618@hotmail.com>
|
||||
Date: Sun, 19 Nov 2023 14:21:12 +0800
|
||||
Subject: [PATCH] fix report api function
|
||||
Subject: [PATCH] fix report api function and memory leak
|
||||
|
||||
proc_report function change to report
|
||||
1. proc_report function change to report
|
||||
2. free pi struct
|
||||
|
||||
Signed-off-by: hurricane618 <hurricane618@hotmail.com>
|
||||
---
|
||||
.../cases/program_action/secDetector_program_action.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
.../cases/program_action/secDetector_program_action.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kerneldriver/cases/program_action/secDetector_program_action.c b/kerneldriver/cases/program_action/secDetector_program_action.c
|
||||
index 4421e43..2a60aac 100644
|
||||
index 4421e43..4f8a555 100644
|
||||
--- a/kerneldriver/cases/program_action/secDetector_program_action.c
|
||||
+++ b/kerneldriver/cases/program_action/secDetector_program_action.c
|
||||
@@ -307,7 +307,7 @@ static int ptrace_attach_pre_handler(struct secDetector_workflow *wf,
|
||||
@@ -307,8 +307,9 @@ static int ptrace_attach_pre_handler(struct secDetector_workflow *wf,
|
||||
timestamp, pi->uid, pi->exe, pi->pid, pi->comm, pi->tgid, pi->ppid, pi->pcomm, pi->pgid, pi->sid, pi->nodename, pi->pns, pi->root_pns,
|
||||
"ptrace_attach", attach_task->pid, current->pid, request, addr, flags);
|
||||
|
||||
- secDetector_proc_report(&log);
|
||||
+ secDetector_report(&log);
|
||||
kfree(log.report_data.text);
|
||||
+ put_common_process_info(pi);
|
||||
|
||||
return 0;
|
||||
@@ -335,7 +335,7 @@ static int do_pipe2_pre_handler(struct secDetector_workflow *wf,
|
||||
}
|
||||
@@ -335,8 +336,9 @@ static int do_pipe2_pre_handler(struct secDetector_workflow *wf,
|
||||
timestamp, pi->uid, pi->exe, pi->pid, pi->comm, pi->tgid, pi->ppid, pi->pcomm, pi->pgid, pi->sid, pi->nodename, pi->pns, pi->root_pns,
|
||||
"");
|
||||
|
||||
- secDetector_proc_report(&log);
|
||||
+ secDetector_report(&log);
|
||||
kfree(log.report_data.text);
|
||||
+ put_common_process_info(pi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Name : secDetector
|
||||
Summary : OS Security Intrusion Detection System
|
||||
Version : 1.0
|
||||
Release : 6
|
||||
Release : 7
|
||||
License : GPL-2.0
|
||||
Source0 : %{name}-v%{version}.tar.gz
|
||||
BuildRequires: kernel-devel kernel-headers
|
||||
@ -99,6 +99,9 @@ rm -rf %{buildroot}
|
||||
%attr(0644,root,root) /usr/include/secDetector/secDetector_topic.h
|
||||
|
||||
%changelog
|
||||
* Wed Nov 29 2023 hurricane618 <hurricane618@hotmail.com> 1.0-7
|
||||
- fix backport patch0001
|
||||
|
||||
* Wed Nov 29 2023 zhangguangzhi <zhangguangzhi3@huawei.com> 1.0-6
|
||||
- backport some patches
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user