Add patch fixing segafult in the audisp-statsd plugin

This commit is contained in:
Steve Grubb 2021-02-18 10:48:12 -05:00
parent ef3b06b9ca
commit b2ea20e553
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff -urp audit-3.0.2.orig/audisp/plugins/statsd/audisp-statsd.c audit-3.0.2/audisp/plugins/statsd/audisp-statsd.c
--- audit-3.0.2.orig/audisp/plugins/statsd/audisp-statsd.c 2021-02-12 10:13:09.000000000 -0500
+++ audit-3.0.2/audisp/plugins/statsd/audisp-statsd.c 2021-02-16 22:39:05.429139678 -0500
@@ -46,7 +46,7 @@ struct daemon_config
unsigned int port;
unsigned int interval;
int sock;
- struct sockaddr addr;
+ struct sockaddr_storage addr;
socklen_t addrlen;
};
@@ -287,7 +287,8 @@ static void send_statsd(void)
r.events_anomaly_count, r.events_response_count);
if (len > 0 && len < (int)sizeof(message))
- sendto(d.sock, message, len, 0, &d.addr, d.addrlen);
+ sendto(d.sock, message, len, 0, (struct sockaddr *)&d.addr,
+ d.addrlen);
}

View File

@ -2,11 +2,12 @@
Summary: User space tools for kernel auditing Summary: User space tools for kernel auditing
Name: audit Name: audit
Version: 3.0.1 Version: 3.0.1
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://people.redhat.com/sgrubb/audit/ URL: http://people.redhat.com/sgrubb/audit/
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
Patch1: audit-3.0.2-sockaddr.patch
BuildRequires: make gcc swig BuildRequires: make gcc swig
BuildRequires: openldap-devel BuildRequires: openldap-devel
@ -87,6 +88,7 @@ Management Facility) database, through an IBM Tivoli Directory Server
%prep %prep
%setup -q %setup -q
cp %{SOURCE1} . cp %{SOURCE1} .
%patch1 -p1
# Remove the ids code, its not ready # Remove the ids code, its not ready
sed -i 's/ ids / /' audisp/plugins/Makefile.in sed -i 's/ ids / /' audisp/plugins/Makefile.in
@ -258,6 +260,9 @@ fi
%attr(750,root,root) /sbin/audispd-zos-remote %attr(750,root,root) /sbin/audispd-zos-remote
%changelog %changelog
* Thu Feb 18 2021 Steve Grubb <sgrubb@redhat.com> 3.0.1-2
- Add patch fixing segafult in the audisp-statsd plugin
* Fri Feb 12 2021 Steve Grubb <sgrubb@redhat.com> 3.0.1-1 * Fri Feb 12 2021 Steve Grubb <sgrubb@redhat.com> 3.0.1-1
- New upstream feature and bugfix release - New upstream feature and bugfix release
- Enable building the audisp-statsd plugin - Enable building the audisp-statsd plugin