[Pkg-clamav-devel] Bug#876429: clamav-freshclam: freshclam incorrectly complains that ClamAV is OUTDATED!

Francois Gouget fgouget at free.fr
Fri Sep 22 07:11:10 UTC 2017


Package: clamav-freshclam
Version: 0.99.3~beta1+dfsg-2
Severity: normal

Dear Maintainer,

In my logs I have the following message:

Sep 22 08:15:28 amboise freshclam[764]: WARNING: Your ClamAV installation is OUTDATED!
Sep 22 08:15:28 amboise freshclam[764]: WARNING: Local version: 0.99.3-beta1 Recommended version: 0.99.2
Sep 22 08:15:28 amboise freshclam[764]: DON'T PANIC! Read http://www.clamav.net/documents/upgrading-clamav

It's interesting that the local version is newer than the recommended
one but that freshclam complains it is outdated anyway.

This warning comes from downloadmanager() in freshclam/manager.c. The
issue is that it truncates the version at the first dash and then issues
the warning if the versions are DIFFERENT:

    pt = strchr (vstr, '-');
    if ((pt && strncmp (vstr, newver, pt - vstr))
        || (!pt && strcmp (vstr, newver)))
    {
        logg ("^Your ClamAV installation is OUTDATED!\n");

This should meybe rather be something like:

    if ((pt && strncmp (vstr, newver, pt - vstr) < 0)
        || (!pt && strcmp (vstr, newver) < 0))

Although that still would not work correctly when comparing something
like 0.10 to 0.9 (comparing versions is always a pain).

In this particular case we are dealing a beta and a solution would be to
skip the comparison for betas, just like the code does for rcs and devel
versions. Adjusting code a few lines up this would yield:

    if (vwarning && !strstr (vstr, "devel")
        && !strstr (vstr, "beta") && !strstr (vstr, "rc"))


-- Package-specific info:
--- configuration ---
Checking configuration files in /etc/clamav

Config file: clamd.conf
-----------------------
PreludeEnable disabled
PreludeAnalyzerName = "ClamAV"
LogFile = "/var/log/clamav/clamav.log"
StatsHostID = "auto"
StatsEnabled disabled
StatsPEDisabled = "yes"
StatsTimeout = "10"
LogFileUnlock disabled
LogFileMaxSize = "4294967295"
LogTime = "yes"
LogClean disabled
LogSyslog disabled
LogFacility = "LOG_LOCAL6"
LogVerbose disabled
LogRotate = "yes"
ExtendedDetectionInfo = "yes"
PidFile disabled
TemporaryDirectory disabled
DatabaseDirectory = "/var/lib/clamav"
OfficialDatabaseOnly disabled
LocalSocket = "/var/run/clamav/clamd.ctl"
LocalSocketGroup = "clamav"
LocalSocketMode = "666"
FixStaleSocket = "yes"
TCPSocket disabled
TCPAddr disabled
MaxConnectionQueueLength = "15"
StreamMaxLength = "10485760"
StreamMinPort = "1024"
StreamMaxPort = "2048"
MaxThreads = "12"
ReadTimeout = "180"
CommandReadTimeout = "5"
SendBufTimeout = "200"
MaxQueue = "100"
IdleTimeout = "30"
ExcludePath disabled
MaxDirectoryRecursion = "15"
FollowDirectorySymlinks disabled
FollowFileSymlinks disabled
CrossFilesystems = "yes"
SelfCheck = "3600"
DisableCache disabled
VirusEvent disabled
ExitOnOOM disabled
AllowAllMatchScan = "yes"
Foreground disabled
Debug disabled
LeaveTemporaryFiles disabled
User = "clamav"
Bytecode = "yes"
BytecodeSecurity = "TrustSigned"
BytecodeTimeout = "60000"
BytecodeUnsigned disabled
BytecodeMode = "Auto"
DetectPUA disabled
ExcludePUA disabled
IncludePUA disabled
AlgorithmicDetection = "yes"
ScanPE = "yes"
ScanELF = "yes"
DetectBrokenExecutables disabled
ScanMail = "yes"
ScanPartialMessages disabled
PhishingSignatures = "yes"
PhishingScanURLs = "yes"
PhishingAlwaysBlockCloak disabled
PhishingAlwaysBlockSSLMismatch disabled
PartitionIntersection disabled
HeuristicScanPrecedence disabled
StructuredDataDetection disabled
StructuredMinCreditCardCount = "3"
StructuredMinSSNCount = "3"
StructuredSSNFormatNormal = "yes"
StructuredSSNFormatStripped disabled
ScanHTML = "yes"
ScanOLE2 = "yes"
OLE2BlockMacros disabled
ScanPDF = "yes"
ScanSWF = "yes"
ScanXMLDOCS = "yes"
ScanHWP3 = "yes"
ScanArchive = "yes"
ArchiveBlockEncrypted disabled
ForceToDisk disabled
MaxScanSize = "104857600"
MaxFileSize = "26214400"
MaxRecursion = "16"
MaxFiles = "10000"
MaxEmbeddedPE = "10485760"
MaxHTMLNormalize = "10485760"
MaxHTMLNoTags = "2097152"
MaxScriptNormalize = "5242880"
MaxZipTypeRcg = "1048576"
MaxPartitions = "50"
MaxIconsPE = "100"
MaxRecHWP3 = "16"
PCREMatchLimit = "10000"
PCRERecMatchLimit = "5000"
PCREMaxFileSize = "26214400"
ScanOnAccess disabled
OnAccessMountPath disabled
OnAccessIncludePath disabled
OnAccessExcludePath disabled
OnAccessExcludeUID disabled
OnAccessMaxFileSize = "5242880"
OnAccessDisableDDD disabled
OnAccessPrevention disabled
OnAccessExtraScanning disabled
DevACOnly disabled
DevACDepth disabled
DevPerformance disabled
DevLiblog disabled
DisableCertCheck disabled

Config file: freshclam.conf
---------------------------
StatsHostID disabled
StatsEnabled disabled
StatsTimeout disabled
LogFileMaxSize = "4294967295"
LogTime disabled
LogSyslog disabled
LogFacility = "LOG_LOCAL6"
LogVerbose disabled
LogRotate = "yes"
PidFile disabled
DatabaseDirectory = "/var/lib/clamav/"
Foreground disabled
Debug disabled
UpdateLogFile = "/var/log/clamav/freshclam.log"
DatabaseOwner = "clamav"
Checks = "24"
DNSDatabaseInfo = "current.cvd.clamav.net"
DatabaseMirror = "db.local.clamav.net", "database.clamav.net"
PrivateMirror disabled
MaxAttempts = "5"
ScriptedUpdates = "yes"
TestDatabases = "yes"
CompressLocalDatabase disabled
ExtraDatabase disabled
DatabaseCustomURL disabled
HTTPProxyServer disabled
HTTPProxyPort disabled
HTTPProxyUsername disabled
HTTPProxyPassword disabled
HTTPUserAgent disabled
NotifyClamd = "/etc/clamav/clamd.conf"
OnUpdateExecute disabled
OnErrorExecute disabled
OnOutdatedExecute disabled
LocalIPAddress disabled
ConnectTimeout = "30"
ReceiveTimeout = "30"
SubmitDetectionStats disabled
DetectionStatsCountry disabled
DetectionStatsHostID disabled
SafeBrowsing disabled
Bytecode = "yes"

clamav-milter.conf not found

Software settings
-----------------
Version: 0.99.3-beta1
Optional features supported: MEMPOOL IPv6 FRESHCLAM_DNS_FIX AUTOIT_EA06 BZIP2 LIBXML2 PCRE ICONV JSON JIT

Database information
--------------------
Database directory: /var/lib/clamav/
WARNING: freshclam.conf and clamd.conf point to different database directories
[3rd Party] winnow_malware_links.ndb: 11952 sigs
[3rd Party] bofhland_malware_URL.ndb: 18 sigs
[3rd Party] jurlbl.ndb: 1928 sigs
[3rd Party] winnow_extended_malware.hdb: 300 sigs
main.cld: version 58, sigs: 4566249, built on Wed Jun  7 23:38:10 2017
[3rd Party] junk.ndb: 56822 sigs
[3rd Party] bofhland_malware_attach.hdb: 1833 sigs
[3rd Party] winnow_malware.hdb: 680 sigs
[3rd Party] porcupine.ndb: 1570 sigs
[3rd Party] winnow_bad_cw.hdb: 1 sig 
[3rd Party] crdfam.clamav.hdb: 1 sig 
[3rd Party] phishtank.ndb: 21583 sigs
[3rd Party] spamimg.hdb: 142 sigs
[3rd Party] scam.ndb: 12470 sigs
[3rd Party] rogue.hdb: 291 sigs
[3rd Party] bofhland_cracked_URL.ndb: 22 sigs
[3rd Party] blurl.ndb: 760 sigs
[3rd Party] winnow.attachments.hdb: 5894 sigs
[3rd Party] spamattach.hdb: 14 sigs
bytecode.cld: version 312, sigs: 74, built on Fri Sep 15 18:38:16 2017
[3rd Party] doppelstern.hdb: 1 sig 
daily.cld: version 23861, sigs: 1743102, built on Fri Sep 22 02:44:07 2017
[3rd Party] bofhland_phishing_URL.ndb: 8 sigs
[3rd Party] phish.ndb: 27176 sigs
[3rd Party] sanesecurity.ftm: 170 sigs
Total number of signatures: 6453061

Platform information
--------------------
uname: Linux 4.12.0-1-amd64 #1 SMP Debian 4.12.6-1 (2017-08-12) x86_64
OS: linux-gnu, ARCH: x86_64, CPU: x86_64
Full OS version: Debian GNU/Linux testing (buster)
zlib version: 1.2.8 (1.2.8), compile flags: a9
Triple: x86_64-pc-linux-gnu
CPU: haswell, Little-endian
platform id: 0x0a2153530807020001070200

Build information
-----------------
GNU C: 7.2.0 (7.2.0)
GNU C++: 7.2.0 (7.2.0)
CPPFLAGS: -Wdate-time -D_FORTIFY_SOURCE=2
CFLAGS: -g -O2 -fdebug-prefix-map=/build/clamav-pDWMrF/clamav-0.99.3~beta1+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS: -g -O2 -fdebug-prefix-map=/build/clamav-pDWMrF/clamav-0.99.3~beta1+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64
LDFLAGS: -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
Configure: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--libexecdir=/usr/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/clamav-pDWMrF/clamav-0.99.3~beta1+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/clamav-pDWMrF/clamav-0.99.3~beta1+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' '--with-dbdir=/var/lib/clamav' '--sysconfdir=/etc/clamav' '--disable-clamav' '--disable-unrar' '--enable-milter' '--enable-dns-fix' '--with-libjson' '--with-system-libmspack' '--with-gnu-ld' '-with-system-llvm=/usr/bin/llvm-config' '--with-llvm-linking=dynamic' '--with-systemdsystemunitdir=/lib/systemd/system' 'build_alias=x86_64-linux-gnu'
sizeof(void*) = 8
Engine flevel: 83, dconf: 83

--- data dir ---
total 441064
-rw-r--r-- 1 clamav clamav    107896 Sep 22 03:56 blurl.ndb
-rw-r--r-- 1 clamav clamav      1860 Sep 19 08:49 bofhland_cracked_URL.ndb
-rw-r--r-- 1 clamav clamav      2078 Sep 22 01:48 bofhland_malware_URL.ndb
-rw-r--r-- 1 clamav clamav    106069 Sep 16 18:48 bofhland_malware_attach.hdb
-rw-r--r-- 1 clamav clamav       874 Sep 22 01:48 bofhland_phishing_URL.ndb
-rw-r--r-- 1 clamav clamav    769024 Sep 15 19:35 bytecode.cld
-rw-r--r-- 1 clamav clamav        82 Jul 13  2016 crdfam.clamav.hdb
-rw-r--r-- 1 clamav clamav 124552192 Sep 22 03:15 daily.cld
-rw-r--r-- 1 clamav clamav        65 Jul 26  2013 doppelstern.hdb
-rw-r--r-- 1 clamav clamav   7083956 Sep 21 09:55 junk.ndb
-rw-r--r-- 1 clamav clamav    233376 Sep 22 07:55 jurlbl.ndb
-rw-r--r-- 1 clamav clamav 307499008 Jun  8 00:39 main.cld
-rw-r--r-- 1 clamav clamav      3172 Sep 22 08:15 mirrors.dat
-rw-r--r-- 1 clamav clamav   4007099 Sep 21 10:54 phish.ndb
-rw-r--r-- 1 clamav clamav   3268883 Sep 22 06:46 phishtank.ndb
-rw-r--r-- 1 clamav clamav    175684 Sep 22 05:46 porcupine.ndb
-rw-r--r-- 1 clamav clamav     32381 Sep 22 05:56 rogue.hdb
-rw-r--r-- 1 clamav clamav     11098 Oct 18  2016 sanesecurity.ftm
-rw-r--r-- 1 clamav clamav   1893003 Sep 21 09:55 scam.ndb
-rw-r--r-- 1 clamav clamav      7510 Jun 22 19:11 sigwhitelist.ign2
-rw-r--r-- 1 clamav clamav      1391 Apr 28 09:56 spamattach.hdb
-rw-r--r-- 1 clamav clamav     13639 Aug 31 10:56 spamimg.hdb
-rw-r--r-- 1 clamav clamav    526635 Jan 17  2016 winnow.attachments.hdb
-rw-r--r-- 1 clamav clamav        66 Jan 17  2016 winnow_bad_cw.hdb
-rw-r--r-- 1 clamav clamav     19668 Sep 22 02:45 winnow_extended_malware.hdb
-rw-r--r-- 1 clamav clamav     41725 Sep 22 02:45 winnow_malware.hdb
-rw-r--r-- 1 clamav clamav   1221802 Sep 22 02:45 winnow_malware_links.ndb

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr:en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages clamav-freshclam depends on:
ii  clamav-base          0.99.3~beta1+dfsg-2
ii  debconf              1.5.63
ii  dpkg                 1.18.24
ii  init-system-helpers  1.49
ii  libc6                2.24-17
ii  libclamav7           0.99.3~beta1+dfsg-2
ii  libssl1.1            1.1.0f-5
ii  logrotate            3.11.0-0.1
ii  lsb-base             9.20170808
ii  procps               2:3.3.12-3
ii  ucf                  3.0036
ii  zlib1g               1:1.2.8.dfsg-5

clamav-freshclam recommends no packages.

Versions of packages clamav-freshclam suggests:
pn  apparmor     <none>
pn  clamav-docs  <none>

-- Configuration Files:
/etc/logcheck/ignore.d.server/clamav-freshclam [Errno 13] Permission non accordée: '/etc/logcheck/ignore.d.server/clamav-freshclam'
/etc/logrotate.d/clamav-freshclam changed:
/var/log/clamav/freshclam.log {
     rotate 12
     weekly
     compress
     delaycompress
     missingok
     create 640  clamav adm
     postrotate
     if [ -d /run/systemd/system ]; then
         systemctl -q is-active clamav-freshclam && systemctl kill --signal=SIGHUP clamav-freshclam || true
     else
         invoke-rc.d clamav-freshclam reload-log > /dev/null || true
     fi
     endscript
     }


-- debconf information:
  clamav-freshclam/NotifyClamd: false
  clamav-freshclam/autoupdate_freshclam: daemon
  clamav-freshclam/local_mirror: db.local.clamav.net
  clamav-freshclam/proxy_user:
  clamav-freshclam/update_interval: 24
  clamav-freshclam/internet_interface:
  clamav-freshclam/PrivateMirror:
  clamav-freshclam/Bytecode: true
  clamav-freshclam/SafeBrowsing: false
  clamav-freshclam/LogRotate: true
  clamav-freshclam/http_proxy:


More information about the Pkg-clamav-devel mailing list