[Pkg-clamav-devel] Bug#771911: clamav-daemon: doesn't listen on TCP socket under systemd

darac at winterwolf.co.uk darac at winterwolf.co.uk
Wed Dec 3 12:07:30 UTC 2014


Package: clamav-daemon
Version: 0.98.5+dfsg-1
Severity: normal

Dear Maintainer,

When started by systemd, it appears that clamav-daemon doesn't listen on
a TCP socket, even when configured to do so. As you can see from the
configuration below, I have TCPSocket and TCPAddr set in
/etc/clamav/clamav.conf and debconf agrees that
clamav-daemon/TcpOrLocal = TCP.

Yet I see the following lines in the clamav.log: 

Mon Dec  1 10:27:56 2014 -> +++ Started at Mon Dec  1 10:27:56 2014
Mon Dec  1 10:27:56 2014 -> Received 1 file descriptor(s) from systemd.
Mon Dec  1 10:27:56 2014 -> clamd daemon 0.98.5 (OS: linux-gnu, ARCH:
x86_64, CPU: x86_64)
Mon Dec  1 10:27:56 2014 -> Running as user clamav (UID 111, GID 119)
Mon Dec  1 10:27:56 2014 -> Log file size limited to 4294967295bytes.
Mon Dec  1 10:27:56 2014 -> Reading databases from /var/lib/clamav
Mon Dec  1 10:27:56 2014 -> Not loading PUA signatures.
Mon Dec  1 10:27:56 2014 -> Bytecode: Security mode set to
"TrustSigned".
Mon Dec  1 10:28:00 2014 -> Loaded 4318859 signatures.
Mon Dec  1 10:28:01 2014 -> TCP: No tcp AF_INET SOCK_STREAM socket
received from systemd.
Mon Dec  1 10:28:01 2014 -> LOCAL: Received AF_UNIX SOCK_STREAM socket
from systemd.
Mon Dec  1 10:28:01 2014 -> Limits: Global size limit set to 104857600
bytes.
...

netstat/lsof also confirm that clamavd isn't listening. It seems to me,
then that the initscript isn't honouring the debconf setting/the config.


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

Config file: clamd.conf
-----------------------
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 = "/var/run/clamav/clamd.pid"
TemporaryDirectory disabled
DatabaseDirectory = "/var/lib/clamav"
OfficialDatabaseOnly disabled
LocalSocket disabled
LocalSocketGroup disabled
LocalSocketMode disabled
FixStaleSocket = "yes"
TCPSocket = "3310"
TCPAddr = "192.168.101.254"
MaxConnectionQueueLength = "15"
StreamMaxLength = "26214400"
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"
AllowSupplementaryGroups = "yes"
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"
ScanArchive = "yes"
ArchiveBlockEncrypted disabled
ForceToDisk disabled
MaxScanSize = "104857600"
MaxFileSize = "26214400"
MaxRecursion = "10"
MaxFiles = "10000"
MaxEmbeddedPE = "10485760"
MaxHTMLNormalize = "10485760"
MaxHTMLNoTags = "2097152"
MaxScriptNormalize = "5242880"
MaxZipTypeRcg = "1048576"
MaxPartitions = "50"
MaxIconsPE = "100"
ScanOnAccess disabled
OnAccessIncludePath disabled
OnAccessExcludePath disabled
OnAccessExcludeUID disabled
OnAccessMaxFileSize = "5242880"
DevACOnly disabled
DevACDepth disabled
DevPerformance disabled
DevLiblog disabled
DisableCertCheck disabled

Config file: freshclam.conf
---------------------------
StatsHostID disabled
StatsEnabled disabled
StatsTimeout disabled
LogFileMaxSize = "4294967295"
LogTime = "yes"
LogSyslog disabled
LogFacility = "LOG_LOCAL6"
LogVerbose disabled
LogRotate = "yes"
PidFile = "/var/run/clamav/freshclam.pid"
DatabaseDirectory = "/var/lib/clamav"
Foreground disabled
Debug disabled
AllowSupplementaryGroups 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 = "proxy.winterwolf.co.uk"
HTTPProxyPort = "8080"
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.98.5
Optional features supported: MEMPOOL IPv6 FRESHCLAM_DNS_FIX AUTOIT_EA06 BZIP2 LIBXML2 JSON JIT

Database information
--------------------
Database directory: /var/lib/clamav
[3rd Party] securiteinfoelf.hdb: 1256 sigs
[3rd Party] porcupine.ndb: 2518 sigs
[3rd Party] spamattach.hdb: 22 sigs
[3rd Party] phishtank.ndb: 17656 sigs
[3rd Party] crdfam.clamav.hdb: 5000 sigs
main.cld: version 55, sigs: 2424225, built on Tue Sep 17 15:57:28 2013
[3rd Party] bofhland_phishing_URL.ndb: 42 sigs
[3rd Party] phish.ndb: 24580 sigs
[3rd Party] securiteinfopdf.hdb: 6206 sigs
[3rd Party] securiteinfooffice.hdb: 4264 sigs
[3rd Party] bofhland_malware_URL.ndb: 474 sigs
[3rd Party] rogue.hdb: 29 sigs
[3rd Party] jurlbl.ndb: 1241 sigs
[3rd Party] mbl.ndb: 0 sig 
[3rd Party] spamimg.hdb: 18 sigs
[3rd Party] doppelstern.hdb: 1 sig 
[3rd Party] securiteinfobat.hdb: 2600 sigs
[3rd Party] honeynet.hdb: 377 sigs
[3rd Party] scam.ndb: 12263 sigs
[3rd Party] securiteinfohtml.hdb: 72478 sigs
[3rd Party] blurl.ndb: 404 sigs
[3rd Party] bofhland_malware_attach.hdb: 1253 sigs
[3rd Party] junk.ndb: 48956 sigs
[3rd Party] bofhland_cracked_URL.ndb: 60298 sigs
daily.cld: version 19716, sigs: 1281441, built on Wed Dec  3 05:41:22 2014
[3rd Party] securiteinfodos.hdb: 4509 sigs
[3rd Party] winnow_malware.hdb: 3237 sigs
[3rd Party] sanesecurity.ftm: 159 sigs
[3rd Party] securiteinfo.hdb: 328587 sigs
[3rd Party] winnow_bad_cw.hdb: 9879 sigs
bytecode.cld: version 242, sigs: 46, built on Tue Jun 24 23:21:59 2014
[3rd Party] winnow_malware_links.ndb: 7167 sigs
[3rd Party] winnow_extended_malware.hdb: 4053 sigs
[3rd Party] securiteinfosh.hdb: 404 sigs
[3rd Party] winnow.attachments.hdb: 698 sigs
Total number of signatures: 4326341

Platform information
--------------------
uname: Linux 3.17.1 #2 SMP Sun Oct 26 08:42:09 GMT 2014 x86_64
OS: linux-gnu, ARCH: x86_64, CPU: x86_64
Full OS version: Debian GNU/Linux testing (jessie)
zlib version: 1.2.8 (1.2.8), compile flags: a9
Triple: x86_64-pc-linux-gnu
CPU: core-avx2, Little-endian
platform id: 0x0a214f4f0804090201040902

Build information
-----------------
GNU C: 4.9.2 (4.9.2)
GNU C++: 4.9.2 (4.9.2)
CPPFLAGS: -D_FORTIFY_SOURCE=2
CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
CXXFLAGS: 
LDFLAGS: -Wl,-z,relro
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' '--libexecdir=/usr/lib/clamav' '--disable-maintainer-mode' '--disable-dependency-tracking' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'LDFLAGS=-Wl,-z,relro' '--with-dbdir=/var/lib/clamav' '--sysconfdir=/etc/clamav' '--disable-clamav' '--disable-unrar' '--enable-milter' '--enable-dns-fix' '--with-libjson' '--with-gnu-ld' '--with-system-tommath' '--without-included-ltdl' '-with-system-llvm=/usr/bin/llvm-config' '--with-systemdsystemunitdir=/lib/systemd/system' 'build_alias=x86_64-linux-gnu'
sizeof(void*) = 8
Engine flevel: 79, dconf: 79

--- data dir ---
total 296104
-rw-r--r-- 1 clamav clamav     54568 Nov 14 10:51 blurl.ndb
-rw-r--r-- 1 clamav clamav   6634170 Nov 14 07:47 bofhland_cracked_URL.ndb
-rw-r--r-- 1 clamav clamav     46284 Nov 14 07:47 bofhland_malware_URL.ndb
-rw-r--r-- 1 clamav clamav     71904 Nov 13 14:48 bofhland_malware_attach.hdb
-rw-r--r-- 1 clamav clamav      5156 Nov 14 00:48 bofhland_phishing_URL.ndb
-rw-r--r-- 1 clamav clamav    379904 Jun 24 23:55 bytecode.cld
-rw-r--r-- 1 clamav clamav    361974 Nov 14 10:47 crdfam.clamav.hdb
-rw-r--r-- 1 clamav clamav  81911808 Dec  3 06:27 daily.cld
-rw-r--r-- 1 clamav clamav        65 Jul 26  2013 doppelstern.hdb
-rw-r--r-- 1 clamav clamav     22549 Feb  5  2013 honeynet.hdb
-rw-r--r-- 1 clamav clamav   6143036 Nov 14 08:52 junk.ndb
-rw-r--r-- 1 clamav clamav    123387 Nov 14 09:50 jurlbl.ndb
-rw-r--r-- 1 clamav clamav 163468288 Sep 17  2013 main.cld
-rw-r--r-- 1 clamav clamav       356 Oct  8  2013 mbl.ndb
-rw-r--r-- 1 clamav clamav   3659163 Nov 14 10:51 phish.ndb
-rw-r--r-- 1 clamav clamav   2549029 Nov 14 10:45 phishtank.ndb
-rw-r--r-- 1 clamav clamav    303662 Nov 14 07:45 porcupine.ndb
-rw-r--r-- 1 clamav clamav      2226 Nov 14 08:52 rogue.hdb
-rw-r--r-- 1 clamav clamav      9952 Sep  3 13:31 sanesecurity.ftm
-rw-r--r-- 1 clamav clamav   1865954 Nov 14 08:52 scam.ndb
-rw-r--r-- 1 clamav clamav  26383557 Nov 14 03:57 securiteinfo.hdb
-rw-r--r-- 1 clamav clamav    200405 Feb  5  2013 securiteinfobat.hdb
-rw-r--r-- 1 clamav clamav    391274 Nov 28  2013 securiteinfodos.hdb
-rw-r--r-- 1 clamav clamav     75040 Jan 21  2014 securiteinfoelf.hdb
-rw-r--r-- 1 clamav clamav   5457344 Feb 19  2014 securiteinfohtml.hdb
-rw-r--r-- 1 clamav clamav    264154 Feb  5  2013 securiteinfooffice.hdb
-rw-r--r-- 1 clamav clamav    468241 Feb  5  2013 securiteinfopdf.hdb
-rw-r--r-- 1 clamav clamav     29520 Feb  5  2013 securiteinfosh.hdb
-rw-r--r-- 1 clamav clamav      5534 Oct 21 19:53 sigwhitelist.ign2
-rw-r--r-- 1 clamav clamav      1535 Sep 24 10:51 spamattach.hdb
-rw-r--r-- 1 clamav clamav      1148 Oct 28 16:51 spamimg.hdb
-rw-r--r-- 1 clamav clamav     69480 Nov 14 00:45 winnow.attachments.hdb
-rw-r--r-- 1 clamav clamav    788191 Nov 14 02:45 winnow_bad_cw.hdb
-rw-r--r-- 1 clamav clamav    252256 Nov 14 00:46 winnow_extended_malware.hdb
-rw-r--r-- 1 clamav clamav    198770 Nov 14 00:46 winnow_malware.hdb
-rw-r--r-- 1 clamav clamav    917945 Nov 14 00:46 winnow_malware_links.ndb

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (550, 'testing'), (500, 'testing-updates'), (500, 'stable-updates'), (450, 'unstable'), (450, 'stable'), (445, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.17.1 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages clamav-daemon depends on:
ii  adduser                         3.113+nmu3
ii  clamav-base                     0.98.5+dfsg-1
ii  clamav-freshclam [clamav-data]  0.98.5+dfsg-1
ii  debconf [debconf-2.0]           1.5.53
ii  dpkg                            1.17.21
ii  init-system-helpers             1.21
ii  libbz2-1.0                      1.0.6-7+b1
ii  libc6                           2.19-13
ii  libclamav6                      0.98.5+dfsg-1
ii  libjson-c2                      0.11-4
ii  libncurses5                     5.9+20140913-1
ii  libssl1.0.0                     1.0.1j-1
ii  libsystemd0                     215-5+b1
ii  libtinfo5                       5.9+20140913-1
ii  lsb-base                        4.1+Debian13+nmu1
ii  procps                          2:3.3.9-8
ii  ucf                             3.0030
ii  zlib1g                          1:1.2.8.dfsg-2

Versions of packages clamav-daemon recommends:
ii  clamdscan  0.98.5+dfsg-1

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

-- debconf information:
* clamav-daemon/ScanArchive: true
* clamav-daemon/ScanOnAccess: false
* clamav-daemon/Bytecode: true
* clamav-daemon/StatsEnabled: false
* clamav-daemon/TcpOrLocal: TCP
* clamav-daemon/AllowAllMatchScan: true
* clamav-daemon/MaxHTMLNormalize: 10M
* clamav-daemon/ScanMail: true
* clamav-daemon/MaxEmbeddedPE: 10M
* clamav-daemon/SelfCheck: 3600
* clamav-daemon/StatsTimeout: 10
  clamav-daemon/FollowDirectorySymlinks: false
  clamav-daemon/LocalSocket: /var/run/clamav/clamd.ctl
* clamav-daemon/BytecodeSecurity: TrustSigned
* clamav-daemon/StatsPEDisabled: true
* clamav-daemon/MaxScriptNormalize: 5M
* clamav-daemon/LogFile: /var/log/clamav/clamav.log
* clamav-daemon/FollowFileSymlinks: false
* clamav-daemon/User: clamav
* clamav-daemon/ReadTimeout: 180
* clamav-daemon/StatsHostID: auto
* clamav-daemon/MaxZipTypeRcg: 1M
* clamav-daemon/MaxHTMLNoTags: 2M
* clamav-daemon/ForceToDisk: false
* clamav-daemon/BytecodeTimeout: 60000
* clamav-daemon/MaxThreads: 12
  clamav-daemon/LocalSocketMode: 666
  clamav-daemon/LocalSocketGroup: clamav
* clamav-daemon/LogSyslog: false
  clamav-daemon/FixStaleSocket: true
* clamav-daemon/TCPSocket: 3310
* clamav-daemon/debconf: true
* clamav-daemon/LogRotate: true
* clamav-daemon/LogTime: true
* clamav-daemon/MaxConnectionQueueLength: 15
* clamav-daemon/TCPAddr: 192.168.101.254
* clamav-daemon/MaxDirectoryRecursion: 15
* clamav-daemon/ScanSWF: true
* clamav-daemon/OnAccessMaxFileSize: 5M
* clamav-daemon/DisableCertCheck: false
* clamav-daemon/AddGroups: Debian-exim
* clamav-daemon/StreamMaxLength: 25



More information about the Pkg-clamav-devel mailing list