#991890 clamav-freshclam: fails to update virus database, cannot apply patch

Package:
clamav-freshclam
Source:
clamav
Description:
anti-virus utility for Unix - virus database update utility
Submitter:
Martin-Éric Racine
Date:
2025-09-06 11:43:02 UTC
Severity:
important
#991890#5
Date:
2021-08-04 14:49:00 UTC
From:
To:
Aug  4 17:46:16 voima freshclam[19355]: Wed Aug  4 17:46:16 2021 -> ClamAV update process started at Wed Aug  4 17:46:16 2021
Aug  4 17:46:16 voima freshclam[19355]: Wed Aug  4 17:46:16 2021 -> daily database available for update (local version: 26206, remote version: 26253)
Aug  4 17:46:20 voima freshclam[19355]: Wed Aug  4 17:46:20 2021 -> !cdiff_apply: lseek(desc, -350, SEEK_END) failed
Aug  4 17:46:20 voima freshclam[19355]: Wed Aug  4 17:46:20 2021 -> !downloadPatch: Can't apply patch
Aug  4 17:46:20 voima freshclam[19355]: Wed Aug  4 17:46:20 2021 -> Downloaded 25 patches for daily, which is fewer than the 47 expected patches.
Aug  4 17:46:20 voima freshclam[19355]: Wed Aug  4 17:46:20 2021 -> We'll settle for this partial-update, at least for now.
Aug  4 17:46:20 voima freshclam[19355]: Wed Aug  4 17:46:20 2021 -> Testing database: '/var/lib/clamav/tmp.67ac57ba2e/clamav-5d56aa35f9c24813f6ddcbf358c53519.tmp-daily.cld' ...
Aug  4 17:46:20 voima freshclam[19384]: Wed Aug  4 17:46:20 2021 -> ~[LibClamAV] **************************************************
Aug  4 17:46:20 voima freshclam[19384]: Wed Aug  4 17:46:20 2021 -> ~[LibClamAV] ***  The virus database is older than 7 days!  ***
Aug  4 17:46:20 voima freshclam[19384]: Wed Aug  4 17:46:20 2021 -> ~[LibClamAV] ***   Please update it as soon as possible.    ***
Aug  4 17:46:20 voima freshclam[19384]: Wed Aug  4 17:46:20 2021 -> ~[LibClamAV] **************************************************
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] hm_addhash_str: invalid hash 2512df6c7973acedbd589e37da6c�c7a
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] cli_loadhash: Malformed hash string at line 2967330
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] cli_loadhash: Problem parsing database at line 2967330
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] Can't load daily.hsb: Invalid argument passed to function
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] cli_tgzload: Can't load daily.hsb
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> ^[LibClamAV] Can't load /var/lib/clamav/tmp.67ac57ba2e/clamav-5d56aa35f9c24813f6ddcbf358c53519.tmp-daily.cld: Malformed database
Aug  4 17:46:23 voima freshclam[19384]: Wed Aug  4 17:46:23 2021 -> !Failed to load new database: Malformed database
Aug  4 17:46:23 voima freshclam[19355]: Wed Aug  4 17:46:23 2021 -> ^Database load exited with "Test failed"
Aug  4 17:46:23 voima freshclam[19355]: Wed Aug  4 17:46:23 2021 -> !Database test FAILED.
Aug  4 17:46:23 voima freshclam[19355]: Wed Aug  4 17:46:23 2021 -> !Unexpected error when attempting to update daily: Test failed
Aug  4 17:46:23 voima freshclam[19355]: Wed Aug  4 17:46:23 2021 -> !Database update process failed: Test failed
Aug  4 17:46:23 voima freshclam[19355]: Wed Aug  4 17:46:23 2021 -> !Update failed.

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

Config file: clamd.conf
- -----------------------
AlertExceedsMax disabled
PreludeEnable disabled
PreludeAnalyzerName = "ClamAV"
LogFile = "/var/log/clamav/clamav.log"
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 = "26214400"
StreamMinPort = "1024"
StreamMaxPort = "2048"
MaxThreads = "12"
ReadTimeout = "180"
CommandReadTimeout = "30"
SendBufTimeout = "200"
MaxQueue = "100"
IdleTimeout = "30"
ExcludePath disabled
MaxDirectoryRecursion = "15"
FollowDirectorySymlinks disabled
FollowFileSymlinks disabled
CrossFilesystems = "yes"
SelfCheck = "3600"
ConcurrentDatabaseReload = "yes"
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
ScanPE = "yes"
ScanELF = "yes"
ScanMail = "yes"
ScanPartialMessages disabled
PhishingSignatures = "yes"
PhishingScanURLs = "yes"
HeuristicAlerts = "yes"
HeuristicScanPrecedence disabled
StructuredDataDetection disabled
StructuredMinCreditCardCount = "3"
StructuredMinSSNCount = "3"
StructuredSSNFormatNormal = "yes"
StructuredSSNFormatStripped disabled
ScanHTML = "yes"
ScanOLE2 = "yes"
AlertBrokenExecutables disabled
AlertBrokenMedia disabled
AlertEncrypted disabled
StructuredCCOnly disabled
AlertEncryptedArchive disabled
AlertEncryptedDoc disabled
AlertOLE2Macros disabled
AlertPhishingSSLMismatch disabled
AlertPhishingCloak disabled
AlertPartitionIntersection disabled
ScanPDF = "yes"
ScanSWF = "yes"
ScanXMLDOCS = "yes"
ScanHWP3 = "yes"
ScanArchive = "yes"
ForceToDisk disabled
MaxScanTime = "120000"
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"
OnAccessMountPath disabled
OnAccessIncludePath disabled
OnAccessExcludePath disabled
OnAccessExcludeRootUID disabled
OnAccessExcludeUID disabled
OnAccessExcludeUname disabled
OnAccessMaxFileSize = "5242880"
OnAccessDisableDDD disabled
OnAccessPrevention disabled
OnAccessExtraScanning disabled
OnAccessCurlTimeout = "5000"
OnAccessMaxThreads = "5"
OnAccessRetryAttempts disabled
OnAccessDenyOnError disabled
DevACOnly disabled
DevACDepth disabled
DevPerformance disabled
DevLiblog disabled
DisableCertCheck disabled
AlgorithmicDetection = "yes"
BlockMax disabled
PhishingAlwaysBlockSSLMismatch disabled
PhishingAlwaysBlockCloak disabled
PartitionIntersection disabled
OLE2BlockMacros disabled
ArchiveBlockEncrypted disabled

Config file: freshclam.conf
- ---------------------------
LogFileMaxSize = "4294967295"
LogTime = "yes"
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
ExcludeDatabase 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"
Bytecode = "yes"

clamav-milter.conf not found

Software settings
- -----------------
Version: 0.103.3
Optional features supported: MEMPOOL IPv6 FRESHCLAM_DNS_FIX AUTOIT_EA06 BZIP2 LIBXML2 PCRE2 ICONV JSON

Database information
- --------------------
Database directory: /var/lib/clamav
bytecode.cld: version 333, sigs: 92, built on Mon Mar  8 17:21:51 2021
main.cld: version 59, sigs: 4564902, built on Mon Nov 25 15:56:15 2019
daily.cld: version 26206, sigs: 3991194, built on Sat Jun 19 14:15:41 2021
Total number of signatures: 8556188

Platform information
- --------------------
uname: Linux 5.10.0-8-amd64 #1 SMP Debian 5.10.46-3 (2021-07-28) x86_64
OS: linux-gnu, ARCH: x86_64, CPU: x86_64
Full OS version: Debian GNU/Linux 11 (bullseye)
zlib version: 1.2.11 (1.2.11), compile flags: a9
platform id: 0x0a217c7c08000000000a0201

Build information
- -----------------
GNU C: 10.2.1 20210110 (10.2.1)
CPPFLAGS: -Wdate-time -D_FORTIFY_SOURCE=2
CFLAGS: -g -O2 -ffile-prefix-map=/build/clamav-QT53wQ/clamav-0.103.3+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 -ffile-prefix-map=/build/clamav-QT53wQ/clamav-0.103.3+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-option-checking' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/clamav-QT53wQ/clamav-0.103.3+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/clamav-QT53wQ/clamav-0.103.3+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-libcurl=/usr' '--with-gnu-ld' '--with-systemdsystemunitdir=/lib/systemd/system' 'build_alias=x86_64-linux-gnu' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/build/clamav-QT53wQ/clamav-0.103.3+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security'
sizeof(void*) = 8
Engine flevel: 124, dconf: 124

- --- data dir ---
total 620496
- -rw-r--r-- 1 clamav clamav   1438720 Mar  8 18:00 bytecode.cld
- -rw-r--r-- 1 clamav clamav 326523904 Jun 19 15:30 daily.cld
- -rw-r--r-- 1 clamav clamav        69 Aug  4 17:43 freshclam.dat
- -rw-r--r-- 1 clamav clamav 307403264 Nov 26  2019 main.cld
- -rw------- 1 clamav clamav        69 Jun 20 09:49 mirrors.dat

- -- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Locale: LANG=fi_FI.utf8, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clamav-freshclam depends on:
ii  clamav-base            0.103.3+dfsg-1
ii  debconf [debconf-2.0]  1.5.77
ii  dpkg                   1.20.9
ii  libc6                  2.31-13
ii  libclamav9             0.103.3+dfsg-1
ii  logrotate              3.18.0-2
ii  lsb-base               11.1.0
ii  procps                 2:3.3.17-5
ii  ucf                    3.0043

Versions of packages clamav-freshclam recommends:
ii  ca-certificates  20210119

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

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

iQIzBAEBCAAdFiEEyJACx3qL7GpObXOQrh+Cd8S017YFAmEKqNwACgkQrh+Cd8S0
17akTRAAiOW2NgQQ4EirFYGSkpCf2Z5La4kinWLG0g48fiiBD72nDJds7I8Nty2y
W7zT6QVtII8fiBAH2K1JtjPGQvH1NNFZT5Tes7RfcsG+SGrx5Bcv8jAEkvMCWv6r
KjpoG6xy0CRQpOUX4A4immA3bgESrIRcQ+AgKE7uHpZjqrsPkoy3XNnz1cFj7UEN
G7wbtG95YuswpeTdpq2HIB3UnE6Npfgg0uGhOayLcMtMXam6Gzzw5hI8mAJO+wo2
GzOhQKS7cvPmdhJ6hBVSZqLkBZ5Hx6icvA77T/xRQKhy9vmipwq1yLfxexyDxpra
HJ+0y/CgXJSrMKaym+vMQtOhWvFc0CUUCa+LwTQ+XqVokE65hbkGoShkQztJ0ujF
1Qk3JsjD5ophNfYB0sTe7+m99jyUzfkD6/f3eV5qHVPJ++3aQveIvmPca+7suwjl
OD5w+lBUsyv34GpPNDyFbnYu9c4yvUmJWfME+dmIkZDZzDLn898YJTpiyz39tezQ
VhgJm9OTkK8ulaCu9cKgGk07Ipu3lahJZBOmTAY7HHlD31YjEGgtd8qwHmjnkIIn
Mk9cnh8/AUi0s+HFWkSO0Kart2DQaZF5DyEoF8bYF3a4QbtzN8im8s0+l0i+mTIj
r7OBipyRZWvQbVr2cGjasmavxVjaScXsGKTcWFyXrXUZkc1oHkQ=
=x85k
-----END PGP SIGNATURE-----

#991890#10
Date:
2025-09-06 11:09:58 UTC
From:
To:
Hi,

Did this resolve by itself? I just noticed that is quite old.

Sebastian

#991890#15
Date:
2025-09-06 11:22:59 UTC
From:
To:
Obviously, if a bug is left unattended for 4 years, it will eventually
resolve itself.

la 6.9.2025 klo 14.10 Sebastian Andrzej Siewior
(sebastian@breakpoint.cc) kirjoitti:

#991890#20
Date:
2025-09-06 11:41:25 UTC
From:
To:
Is this irony or is really gone? Looking back at this, it has a problem
with updating the database. This could be a temporary glitch or a
persisting problem. This could be fixed by cleaning the database and
forcing it to start from scratch. It could also be bug in the freshclam
package which was resolved somewhere between 0.103.3 and 0.103.10. Also
This version is close to EOL.
Therefore I'm inclined to close this.

Sebastian