Compare commits

...

2 Commits
rawhide ... f16

Author SHA1 Message Date
Jaroslav Škarvada
7a843fe195 Backported fix for CVE-2012-5671
Resolves: CVE-2012-5671
2012-10-26 11:13:18 +02:00
Jaroslav Škarvada
527939b610 Backported fix for exim-clamav to work with /var/run on tmpfs 2012-02-24 16:30:31 +01:00
3 changed files with 47 additions and 3 deletions

View File

@ -0,0 +1,25 @@
--- a/src/dkim.c
+++ a/src/dkim.c
@@ -42,6 +42,9 @@ int dkim_exim_query_dns_txt(char *name, char *answer) {
"%.*s", (int)len, (char *)((rr->data)+rr_offset));
rr_offset+=len;
answer_offset+=len;
+ if (answer_offset >= PDKIM_DNS_TXT_MAX_RECLEN) {
+ return PDKIM_FAIL;
+ }
}
}
else return PDKIM_FAIL;
--- a/src/pdkim/pdkim.h
+++ a/src/pdkim/pdkim.h
@@ -27,8 +27,8 @@
/* -------------------------------------------------------------------------- */
/* Length of the preallocated buffer for the "answer" from the dns/txt
- callback function. */
-#define PDKIM_DNS_TXT_MAX_RECLEN 4096
+ callback function. This should match the maximum RDLENGTH from DNS. */
+#define PDKIM_DNS_TXT_MAX_RECLEN (1 << 16)
/* -------------------------------------------------------------------------- */
/* Function success / error codes */

View File

@ -0,0 +1 @@
D /var/run/clamd.exim 0750 exim exim -

View File

@ -12,13 +12,13 @@
Summary: The exim mail transfer agent Summary: The exim mail transfer agent
Name: exim Name: exim
Version: 4.76 Version: 4.76
Release: 4%{?dist} Release: 4%{?dist}.2
License: GPLv2+ License: GPLv2+
Url: http://www.exim.org/ Url: http://www.exim.org/
Group: System Environment/Daemons Group: System Environment/Daemons
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: MTA smtpd smtpdaemon server(smtp) Provides: MTA smtpd smtpdaemon server(smtp)
Requires(post): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives Requires(post): /sbin/chkconfig /sbin/service /sbin/restorecon %{_sbindir}/alternatives
Requires(preun): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives Requires(preun): /sbin/chkconfig /sbin/service %{_sbindir}/alternatives
Requires(pre): %{_sbindir}/groupadd, %{_sbindir}/useradd Requires(pre): %{_sbindir}/groupadd, %{_sbindir}/useradd
%if 0%{?buildclam} %if 0%{?buildclam}
@ -30,6 +30,9 @@ Source3: exim.sysconfig
Source4: exim.logrotate Source4: exim.logrotate
Source5: exim-tidydb.sh Source5: exim-tidydb.sh
Source11: exim.pam Source11: exim.pam
%if 0%{?buildclam}
Source12: exim-clamav-tmpfiles.conf
%endif
%if 0%{?buildsa} %if 0%{?buildsa}
Source13: http://marc.merlins.org/linux/exim/files/sa-exim-4.2.tar.gz Source13: http://marc.merlins.org/linux/exim/files/sa-exim-4.2.tar.gz
%endif %endif
@ -52,6 +55,7 @@ Patch22: exim-4.66-greylist-conf.patch
Patch23: exim-4.67-smarthost-config.patch Patch23: exim-4.67-smarthost-config.patch
Patch25: exim-4.69-dynlookup-config.patch Patch25: exim-4.69-dynlookup-config.patch
Patch26: exim-4.69-strictaliasing.patch Patch26: exim-4.69-strictaliasing.patch
Patch27: exim-4.76-CVE-2012-5671.patch
Requires: /etc/pki/tls/certs /etc/pki/tls/private Requires: /etc/pki/tls/certs /etc/pki/tls/private
Requires: /etc/aliases Requires: /etc/aliases
@ -181,6 +185,7 @@ greylisting unconditional.
%patch23 -p1 -b .smarthost %patch23 -p1 -b .smarthost
%patch25 -p1 -b .dynconfig %patch25 -p1 -b .dynconfig
%patch26 -p1 -b .strictaliasing %patch26 -p1 -b .strictaliasing
%patch27 -p1 -b .CVE-2012-5671
cp src/EDITME Local/Makefile cp src/EDITME Local/Makefile
sed -i 's@^# LOOKUP_MODULE_DIR=.*@LOOKUP_MODULE_DIR=%{_libdir}/exim/%{version}-%{release}/lookups@' Local/Makefile sed -i 's@^# LOOKUP_MODULE_DIR=.*@LOOKUP_MODULE_DIR=%{_libdir}/exim/%{version}-%{release}/lookups@' Local/Makefile
@ -317,6 +322,8 @@ CLAMD_SOCKET=%{_var}/run/clamd.exim/clamd.sock
EOF EOF
ln -sf clamd $RPM_BUILD_ROOT/usr/sbin/clamd.exim ln -sf clamd $RPM_BUILD_ROOT/usr/sbin/clamd.exim
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/tmpfiles.d/exim-clamav.conf
mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim
mkdir -p $RPM_BUILD_ROOT%{_var}/log mkdir -p $RPM_BUILD_ROOT%{_var}/log
touch $RPM_BUILD_ROOT%{_var}/log/clamd.exim touch $RPM_BUILD_ROOT%{_var}/log/clamd.exim
@ -470,8 +477,11 @@ fi
%if 0%{?buildclam} %if 0%{?buildclam}
%post clamav %post clamav
/bin/mkdir -p 0750 %{_var}/run/clamd.exim
/bin/chown exim:exim %{_var}/run/clamd.exim
/bin/touch %{_var}/log/clamd.exim /bin/touch %{_var}/log/clamd.exim
/bin/chown exim.exim %{_var}/log/clamd.exim /bin/chown exim.exim %{_var}/log/clamd.exim
/sbin/restorecon %{_var}/log/clamd.exim
/sbin/chkconfig --add clamd.exim /sbin/chkconfig --add clamd.exim
%preun clamav %preun clamav
@ -488,7 +498,8 @@ test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || :
%config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/exim.conf %config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/exim.conf
%config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamd.exim %config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamd.exim
%config(noreplace) %verify(not mtime) %{_sysconfdir}/logrotate.d/clamd.exim %config(noreplace) %verify(not mtime) %{_sysconfdir}/logrotate.d/clamd.exim
%attr(0750,exim,exim) %dir %{_var}/run/clamd.exim %config(noreplace) %{_sysconfdir}/tmpfiles.d/exim-clamav.conf
%ghost %attr(0750,exim,exim) %dir %{_var}/run/clamd.exim
%ghost %attr(0644,exim,exim) %{_var}/log/clamd.exim %ghost %attr(0644,exim,exim) %{_var}/log/clamd.exim
%endif %endif
@ -500,6 +511,13 @@ test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null || :
%{_sysconfdir}/cron.daily/greylist-tidy.sh %{_sysconfdir}/cron.daily/greylist-tidy.sh
%changelog %changelog
* Fri Oct 26 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 4.76-4.2
- Backported fix for CVE-2012-5671
Resolves: CVE-2012-5671
* Fri Feb 24 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 4.76-4.1
- Backported fix for exim-clamav to work with /var/run on tmpfs
* Thu Jun 16 2011 Marcela Mašláňová <mmaslano@redhat.com> - 4.76-4 * Thu Jun 16 2011 Marcela Mašláňová <mmaslano@redhat.com> - 4.76-4
- Perl mass rebuild - Perl mass rebuild