已开启
upstream: openEuler-24.03-LTS-SP1 - openEuler-24.03-LTS-SP1 #221
xuraoqing创建于 5月7日
upstream: openEuler-24.03-LTS-SP1 - openEuler-24.03-LTS-SP1 #221
已开启
共 2 个文件变更+22-6
| @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing | |||
| 2 | Name: audit | 2 | Name: audit |
| 3 | Epoch: 1 | 3 | Epoch: 1 |
| 4 | Version: 3.1.2 | 4 | Version: 3.1.2 |
| 5 | -Release: 14 | 5 | +Release: 15 |
| 6 | License: GPLv2+ and LGPLv2+ | 6 | License: GPLv2+ and LGPLv2+ |
| 7 | URL: https://people.redhat.com/sgrubb/audit/ | 7 | URL: https://people.redhat.com/sgrubb/audit/ |
| 8 | Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | 8 | Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz |
| @@ -425,6 +425,9 @@ fi | |||
| 425 | %attr(644,root,root) %{_mandir}/man8/*.8.gz | 425 | %attr(644,root,root) %{_mandir}/man8/*.8.gz |
| 426 | 426 | ||
| 427 | %changelog | 427 | %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-14 | 431 | * Wed Mar 18 2026 Linux_zhang <244695981@qq.com>- 1:3.1.2-14 |
| 429 | - backport patches to fix bugs | 432 | - backport patches to fix bugs |
| 430 | 433 | ||
| @@ -8,11 +8,11 @@ Hardened plist_append to free the freshly allocated node when duplicating the pl | |||
| 8 | Updated cleanup_event to respect the optional event_is_prealloc hook before freeing events, preventing accidental frees of pooled objects. | 8 | Updated cleanup_event to respect the optional event_is_prealloc hook before freeing events, preventing accidental frees of pooled objects. |
| 9 | 9 | ||
| 10 | Ensured client messages are NUL-terminated within buffer bounds by clamping the termination index before modifying the header buffer. | 10 | Ensured 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 | ||
| 17 | diff --git a/audisp/audispd-llist.c b/audisp/audispd-llist.c | 17 | diff --git a/audisp/audispd-llist.c b/audisp/audispd-llist.c |
| 18 | index 15ec038..64c1070 100644 | 18 | index 15ec038..64c1070 100644 |
| @@ -34,6 +34,22 @@ index 15ec038..64c1070 100644 | |||
| 34 | } else | 34 | } 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 */ | ||
| 37 | diff --git a/src/auditd-listen.c b/src/auditd-listen.c | 53 | diff --git a/src/auditd-listen.c b/src/auditd-listen.c |
| 38 | index cf92f2b..77488e2 100644 | 54 | index cf92f2b..77488e2 100644 |
| 39 | --- a/src/auditd-listen.c | 55 | --- 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 | - | ||