From 13e2090effc1411c0a6253d904ee6864d4506a95 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Sat, 5 Apr 2008 01:38:01 +0000 Subject: [PATCH] - Fix memleak in auditd eoe code --- audit-1.7.1-eoe-memleak.patch | 13 +++++++++++++ audit.spec | 9 +++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 audit-1.7.1-eoe-memleak.patch diff --git a/audit-1.7.1-eoe-memleak.patch b/audit-1.7.1-eoe-memleak.patch new file mode 100644 index 0000000..67c33ba --- /dev/null +++ b/audit-1.7.1-eoe-memleak.patch @@ -0,0 +1,13 @@ +diff -urp audit-1.7/src/auditd.c audit-1.7.1/src/auditd.c +--- audit-1.7/src/auditd.c 2008-01-01 09:55:36.000000000 -0500 ++++ audit-1.7.1/src/auditd.c 2008-04-04 21:19:35.000000000 -0400 +@@ -150,7 +150,8 @@ static void distribute_event(struct audi + enqueue_event(rep); + if (yield) + pthread_yield(); /* Let other thread try to log it. */ +- } ++ } else ++ free(rep); // This function takes custody of the memory + + // FIXME: This is commented out since it fails to work. The + // problem is that the logger thread free's the buffer. Probably diff --git a/audit.spec b/audit.spec index eade7f3..404ee05 100644 --- a/audit.spec +++ b/audit.spec @@ -1,5 +1,5 @@ %define sca_version 0.4.6 -%define sca_release 3 +%define sca_release 4 %define selinux_variants mls strict targeted %define selinux_policyver 3.2.5 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -7,13 +7,14 @@ Summary: User space tools for 2.6 kernel auditing Name: audit Version: 1.7 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://people.redhat.com/sgrubb/audit/ Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz Patch1: audit-1.7.1-overflow.patch Patch2: audit-1.7.1-lsb-headers.patch +Patch3: audit-1.7.1-eoe-memleak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gettext-devel intltool libtool swig python-devel BuildRequires: kernel-headers >= 2.6.18 @@ -99,6 +100,7 @@ A graphical utility for editing audit configuration. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 mkdir zos-remote-policy cp -p audisp/plugins/zos-remote/policy/audispd-zos-remote.* zos-remote-policy @@ -319,6 +321,9 @@ fi %config(noreplace) %{_sysconfdir}/security/console.apps/system-config-audit-server %changelog +* Fri Apr 04 2008 Steve Grubb 1.7-3 +- Fix memleak in auditd eoe code + * Tue Apr 01 2008 Steve Grubb 1.7-2 - Remove LSB headers from init scripts - Fix buffer overflow in audit_log_user_command again