已开启
upstream: openEuler-24.03-LTS-SP1 - openEuler-24.03-LTS-SP1 #221
upstream: openEuler-24.03-LTS-SP1 - openEuler-24.03-LTS-SP1 #221
已开启
xuraoqing创建于 5月7日
共 2 个文件变更+22-6
@@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing
2Name: audit2Name: audit
3Epoch: 13Epoch: 1
4Version: 3.1.24Version: 3.1.2
5-Release: 145+Release: 15
6License: GPLv2+ and LGPLv2+6License: GPLv2+ and LGPLv2+
7URL: https://people.redhat.com/sgrubb/audit/7URL: https://people.redhat.com/sgrubb/audit/
8Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz8Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
@@ -425,6 +425,9 @@ fi
425%attr(644,root,root) %{_mandir}/man8/*.8.gz425%attr(644,root,root) %{_mandir}/man8/*.8.gz
426 426 
427%changelog427%changelog
428+* Thu May 07 2026 Xu Raoqing <xuraoqing@h-partners.com> - 1:3.1.2-15
429+- Update patch: backport-Harden-against-a-couple-memory-issues.patch
430+ 
428* Wed Mar 18 2026 Linux_zhang <244695981@qq.com>- 1:3.1.2-14431* Wed Mar 18 2026 Linux_zhang <244695981@qq.com>- 1:3.1.2-14
429- backport patches to fix bugs432- backport patches to fix bugs
430 433 
@@ -8,11 +8,11 @@ Hardened plist_append to free the freshly allocated node when duplicating the pl
8Updated cleanup_event to respect the optional event_is_prealloc hook before freeing events, preventing accidental frees of pooled objects.8Updated cleanup_event to respect the optional event_is_prealloc hook before freeing events, preventing accidental frees of pooled objects.
9 9 
10Ensured client messages are NUL-terminated within buffer bounds by clamping the termination index before modifying the header buffer.10Ensured client messages are NUL-terminated within buffer bounds by clamping the termination index before modifying the header buffer.
11- 
12---11---
13 audisp/audispd-llist.c | 8 ++++++--12 audisp/audispd-llist.c | 8 ++++++--
13+ src/auditd-event.c | 4 +++-
14 src/auditd-listen.c | 17 ++++++++++++-----14 src/auditd-listen.c | 17 ++++++++++++-----
15- 2 files changed, 18 insertions(+), 7 deletions(-)15+ 3 files changed, 21 insertions(+), 8 deletions(-)
16 16 
17diff --git a/audisp/audispd-llist.c b/audisp/audispd-llist.c17diff --git a/audisp/audispd-llist.c b/audisp/audispd-llist.c
18index 15ec038..64c1070 10064418index 15ec038..64c1070 100644
@@ -34,6 +34,22 @@ index 15ec038..64c1070 100644
34 } else34 } else
35 newnode->p = NULL;35 newnode->p = NULL;
36 36
37+diff --git a/src/auditd-event.c b/src/auditd-event.c
38+index d3f108e..6afecd3 100644
39+--- a/src/auditd-event.c
40++++ b/src/auditd-event.c
41+@@ -526,7 +526,10 @@ void cleanup_event(struct auditd_event *e)
42+ // into the middle of the reply allocation. Check for it.
43+ if (e->reply.message != e->reply.msg.data)
44+ free((void *)e->reply.message);
45+- free(e);
46++ if (!event_is_prealloc)
47++ free(e);
48++ else if (!event_is_prealloc(e))
49++ free(e);
50+ }
51+
52+ /* This function takes a reconfig event and sends it to the handler */
37diff --git a/src/auditd-listen.c b/src/auditd-listen.c53diff --git a/src/auditd-listen.c b/src/auditd-listen.c
38index cf92f2b..77488e2 10064454index cf92f2b..77488e2 100644
39--- a/src/auditd-listen.c55--- a/src/auditd-listen.c
@@ -69,6 +85,3 @@ index cf92f2b..77488e2 100644
69 }85 }
70 }86 }
71 87
72---
73-2.43.0
74-