Bug 182975 - security/clamav 0.98 unable to verify database integrity
Summary: security/clamav 0.98 unable to verify database integrity
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 18:10 UTC by Henry Jalonen
Modified: 2013-10-15 12:40 UTC (History)
0 users

See Also:


Attachments
file.diff (350 bytes, patch)
2013-10-14 18:10 UTC, Henry Jalonen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Jalonen 2013-10-14 18:10:00 UTC
As reported on clamav bugzilla issue 9115 <https://bugzilla.clamav.net/show_bug.cgi?id=9115>, libclamav verification code has changed and database verification fails (at least) on sparc64. 

The fix is targeted for 0.98.1 upstream release.

Fix: Proposed patch attached (works for me, at least).

Patch attached with submission follows:
How-To-Repeat: Install clamav-0.98_1 on sparc64, run freshclam
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-10-14 19:50:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2013-10-14 20:24:49 UTC
State Changed
From-To: open->feedback

Could you please check if the patch committed at [1] is enough to fix the issue 
for you? 

[1] https://github.com/vrtadmin/clamav-devel/commit/a9d40672390a82e91a8d5c21ee2fe172fca4d2f8
Comment 3 Henry Jalonen 2013-10-15 08:42:28 UTC
Yup. Works perfectly.

-- 
Henry Jalonen
+358-50-5056632
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-10-15 12:34:13 UTC
Author: garga
Date: Tue Oct 15 11:33:56 2013
New Revision: 330384
URL: http://svnweb.freebsd.org/changeset/ports/330384

Log:
  - Fix issue on sparc64 (maybe other architetures?) that prevent clamav to verify
    database integrity
  - Bump PORTREVISION
  
  PR:		ports/182975
  Submitted by:	Henry Jalonen <henkka@spheroid.fi>
  Obtained from:	clamav git repo (a9d40672390a82e91a8d5c21ee2fe172fca4d2f8)

Added:
  head/security/clamav/files/patch-libclamav__bignum_fast.h   (contents, props changed)
Modified:
  head/security/clamav/Makefile

Modified: head/security/clamav/Makefile
==============================================================================
--- head/security/clamav/Makefile	Tue Oct 15 10:22:54 2013	(r330383)
+++ head/security/clamav/Makefile	Tue Oct 15 11:33:56 2013	(r330384)
@@ -3,7 +3,7 @@
 
 PORTNAME=	clamav
 PORTVERSION=	0.98
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	SF
 

Added: head/security/clamav/files/patch-libclamav__bignum_fast.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/clamav/files/patch-libclamav__bignum_fast.h	Tue Oct 15 11:33:56 2013	(r330384)
@@ -0,0 +1,32 @@
+--- libclamav/bignum_fast.h
++++ libclamav/bignum_fast.h
+@@ -7,6 +7,14 @@
+  * 
+  * Tom St Denis, tomstdenis@gmail.com
+  */
++
++/* Oct 1, 2013
++ * Adding clamav-config.h include here for size-checking on fall-through case
++ */
++#if HAVE_CONFIG_H
++#include "clamav-config.h"
++#endif
++
+ #ifndef TFM_H_
+ #define TFM_H_
+ 
+@@ -249,7 +257,13 @@
+       typedef signed long long   long64;
+    #endif
+ #endif
+-   typedef unsigned long      fp_digit;
++   /* The code requires that fp_word be twice the size of fp_digit.
++    * Add size-checking for special case (both long and long long are 64) */
++   #if (SIZEOF_LONG == 8) && (SIZEOF_LONG_LONG == 8)
++      typedef unsigned int       fp_digit;
++   #else
++      typedef unsigned long      fp_digit;
++   #endif
+    typedef ulong64            fp_word;
+ #endif
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Renato Botelho freebsd_committer freebsd_triage 2013-10-15 12:35:08 UTC
State Changed
From-To: feedback->closed

Fixed. Thanks!