Hello community,

here is the log from the commit of package pmacct for openSUSE:Factory checked 
in at 2020-03-30 23:03:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pmacct (Old)
 and      /work/SRC/openSUSE:Factory/.pmacct.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pmacct"

Mon Mar 30 23:03:58 2020 rev:6 rq:789671 version:1.7.4p1

Changes:
--------
--- /work/SRC/openSUSE:Factory/pmacct/pmacct.changes    2020-02-19 
12:43:00.371909469 +0100
+++ /work/SRC/openSUSE:Factory/.pmacct.new.3160/pmacct.changes  2020-03-30 
23:04:04.284199349 +0200
@@ -1,0 +2,6 @@
+Mon Mar 30 07:47:03 UTC 2020 - Marcus Meissner <[email protected]>
+
+- pmacct-fix-overflow.patch: fixed bufferoverflow in sfacctd.
+- reenable _FORTIFY_SOURCE that showed that failure
+
+-------------------------------------------------------------------

New:
----
  pmacct-fix-overflow.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pmacct.spec ++++++
--- /var/tmp/diff_new_pack.VQXYMl/_old  2020-03-30 23:04:06.460200589 +0200
+++ /var/tmp/diff_new_pack.VQXYMl/_new  2020-03-30 23:04:06.464200591 +0200
@@ -41,6 +41,7 @@
 Source11:       pmacctd.conf
 Source12:       sfacctd.conf
 Source20:       pmacct.1
+Patch0:                pmacct-fix-overflow.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libmysqlclient-devel
@@ -73,13 +74,14 @@
 
 %prep
 %setup -q -n %{name}-1.7.4
+%patch0 -p1
 
 # fix permissions
 chmod -x sql/pmacct-*
 
 %build
 autoreconf -fiv
-export CFLAGS="%{optflags} -Wno-return-type -D_FORTIFY_SOURCE=0"
+export CFLAGS="%{optflags} -Wno-return-type"
 %configure \
     --sysconfdir=%{_sysconfdir}/%{name} \
     --docdir="%{_docdir}/%{name}" \

++++++ pmacct-fix-overflow.patch ++++++
Index: pmacct-1.7.4/src/sfacctd.c
===================================================================
--- pmacct-1.7.4.orig/src/sfacctd.c
+++ pmacct-1.7.4/src/sfacctd.c
@@ -2045,7 +2045,7 @@ void finalizeSample(SFSample *sample, st
 
 int SF_find_id(struct id_table *t, struct packet_ptrs *pptrs, pm_id_t *tag, 
pm_id_t *tag2)
 {
-  struct sockaddr sa_local;
+  struct sockaddr_storage sa_local;
   struct sockaddr_in *sa4 = (struct sockaddr_in *) &sa_local;
   struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *) &sa_local;
   SFSample *sample = (SFSample *)pptrs->f_data; 
@@ -2086,13 +2086,13 @@ int SF_find_id(struct id_table *t, struc
   if (sample->agent_addr.type == SFLADDRESSTYPE_IP_V4) {
     begin = 0;
     end = t->ipv4_num;
-    sa_local.sa_family = AF_INET;
+    sa_local.ss_family = AF_INET;
     sa4->sin_addr.s_addr = sample->agent_addr.address.ip_v4.s_addr;
   }
   else if (sample->agent_addr.type == SFLADDRESSTYPE_IP_V6) {
     begin = t->num-t->ipv6_num;
     end = t->num;
-    sa_local.sa_family = AF_INET6;
+    sa_local.ss_family = AF_INET6;
     memcpy(sa6->sin6_addr.s6_addr, sample->agent_addr.address.ip_v6.s6_addr, 
16);
   }
 

Reply via email to