clamav update failed - default timeout needs a bump (upstream has bumped already)

Bug #1865818 reported by cwf3wfwfswf
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Fix Released
High
Unassigned

Bug Description

since the last 1 month clam av is not getting updated.
clamtk reports antivirus signatures outdated.
sudo freshclam starts the update which is about 56 mb but the update fails at around 17-18 mb.
this is with a fresh install of both 18.04.4 & 19.10.
tried various repositories but to no avail.

clamscan -V
ClamAV 0.102.2

please have a look here =

https://postimg.cc/vgZydjMt

& here =

https://postimg.cc/D83BSkqs

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: clamav 0.102.2+dfsg-0ubuntu0.18.04.1
ProcVersionSignature: Ubuntu 5.3.0-40.32~18.04.1-generic 5.3.18
Uname: Linux 5.3.0-40-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.11
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 3 10:17:52 2020
InstallationDate: Installed on 2020-02-29 (2 days ago)
InstallationMedia: Ubuntu 18.04.4 LTS "Bionic Beaver" - Release amd64 (20200203.1)
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: clamav
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
cwf3wfwfswf (vdvegegeg-deactivatedaccount) wrote :
description: updated
information type: Private Security → Public
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (9.4 KiB)

Hi,
it seems to time out on you :-/

By default that should be done automatically in background by the service:

root@b:~# systemctl status clamav-freshclam.service
● clamav-freshclam.service - ClamAV virus database updater
   Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-03-06 10:20:51 UTC; 3min 6s ago
     Docs: man:freshclam(1)
           man:freshclam.conf(5)
           https://www.clamav.net/documents
 Main PID: 22378 (freshclam)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/clamav-freshclam.service
           └─22378 /usr/bin/freshclam -d --foreground=true

Mar 06 10:21:11 b freshclam[22378]: Fri Mar 6 10:21:11 2020 -> daily.cvd updated (version: 25742, sigs: 2208177, f-level: 63, builder: raynman)
Mar 06 10:21:11 b freshclam[22378]: Fri Mar 6 10:21:11 2020 -> main database available for download (remote version: 59)
Mar 06 10:21:28 b freshclam[22378]: Fri Mar 6 10:21:28 2020 -> Testing database: '/var/lib/clamav/tmp.0b342/clamav-ea8e6554afa4b49023af11272e09532f.tmp-main.cvd' ...
Mar 06 10:21:35 b freshclam[22378]: Fri Mar 6 10:21:35 2020 -> Database test passed.
Mar 06 10:21:35 b freshclam[22378]: Fri Mar 6 10:21:35 2020 -> main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Mar 06 10:21:35 b freshclam[22378]: Fri Mar 6 10:21:35 2020 -> bytecode database available for download (remote version: 331)
Mar 06 10:21:35 b freshclam[22378]: Fri Mar 6 10:21:35 2020 -> Testing database: '/var/lib/clamav/tmp.0b342/clamav-7daed3263eb26f753d70cec595669ca0.tmp-bytecode.cvd' ...
Mar 06 10:21:36 b freshclam[22378]: Fri Mar 6 10:21:36 2020 -> Database test passed.
Mar 06 10:21:36 b freshclam[22378]: Fri Mar 6 10:21:36 2020 -> bytecode.cvd updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Mar 06 10:21:36 b freshclam[22378]: Fri Mar 6 10:21:36 2020 -> !NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf

And its full log (could be usefull to attach that to the bug) would look like:
root@b:~# journalctl -u clamav-freshclam.service
-- Logs begin at Tue 2019-12-17 08:53:23 UTC, end at Fri 2020-03-06 10:23:51 UTC. --
Mar 06 10:20:51 b systemd[1]: clamav-freshclam.service: Failed to reset devices.list: Operation not permitted
Mar 06 10:20:51 b systemd[1]: Started ClamAV virus database updater.
Mar 06 10:20:51 b freshclam[22378]: Fri Mar 6 10:20:51 2020 -> ClamAV update process started at Fri Mar 6 10:20:51 2020
Mar 06 10:20:51 b systemd[1]: clamav-freshclam.service: Failed to reset devices.list: Operation not permitted
Mar 06 10:20:51 b systemd[1]: clamav-freshclam.service: Failed to reset devices.list: Operation not permitted
Mar 06 10:20:53 b freshclam[22378]: Fri Mar 6 10:20:53 2020 -> daily database available for download (remote version: 25742)
Mar 06 10:21:04 b freshclam[22378]: Fri Mar 6 10:21:04 2020 -> Testing database: '/var/lib/clamav/tmp.0b342/clamav-d27d67a14d4730fa24f41ecf9e5e83a8.tmp-daily.cvd' ...
Mar 06 10:21:11 b freshclam[22378]: Fri Mar 6 10:21:11 2020 -> Database test passed.
Mar 06 10:21:11 b freshclam[22378]: Fri Mar 6 10:21:11 2020 -> daily.cvd updated (version...

Read more...

Changed in clamav (Ubuntu):
status: New → Triaged
importance: Undecided → High
tags: added: server-next
summary: - clamav update failed
+ clamav update failed - default timeout needs a bump (upstream has bumped
+ already)
Revision history for this message
cwf3wfwfswf (vdvegegeg-deactivatedaccount) wrote :

hi christian

yes by default it should be done automatically in the background & it used to but not since the last month now.

for the manual update i do > sudo systemctl stop clamav-freshclam > sudo freshclam

i did this because clamtk reported signatures out of date & clamscan -V did not give me the latest signature version with the date as it used to.

this fix provided here solves the problem, please do have a look :

https://gitlab.com/dave_m/clamtk/issues/90

i have been with bionic ever since it was released & have had the same internet connection but never faced this issue earlier.

the same computer, the same internet connection but with debian buster installed clamav & clamtk have absolutely no issues.

for your reference here is my ubuntu bionic freshclam.conf :

https://postimg.cc/GHtX3nNZ

for your reference here is the debian buster freshclam.conf :

https://postimg.cc/RJ9QrM3p

i will bump the default 30 second timeout to 300 & report back.

Revision history for this message
cwf3wfwfswf (vdvegegeg-deactivatedaccount) wrote :

hi!

did a fresh install of ubuntu 18.04.4, updated the software & did a restart.
next i installed clamav & clamtk but clamav would not update the signatures in the background by default as it should so i edited freshclam.conf & bumped the default 30 second ConnectTimeout & ReceiveTimeout to 300 as shown by you & the update was done.

just out of curiosity i did a fresh install again, did a software update, restarted & installed clamav & clamtk.

clamav would not update the signatures in the background by default as it should so i edited freshclam.conf but this time instead of bumping both ConnectTimeout & ReceiveTimeout to 300 i copied from the debian freshclam.conf & only edited the ReceiveTimeout to 0 & restarted.

after a few minutes when i checked with clamscan -V it showed me the latest signature version with date & time as it always did before > ClamAV 0.102.2/25744/Sat Mar 7 19:46:15 2020
clamav had done the update automatically in the background.

for your reference here is =

the default ubuntu bionic 18.04.4 freshclam.conf :

https://postimg.cc/GHtX3nNZ

the default debian buster 10.3 freshclam.conf :

https://postimg.cc/RJ9QrM3p

the edited ubuntu bionic 18.04.4 freshclam.conf :

https://postimg.cc/GBRzC0m6

what i understand is that the problem is only with the 30 second default RecieveTimeout in freshclam.conf but i guess you would know better.

please look into it & do the needful.

information type: Public → Private Security
information type: Private Security → Public Security
information type: Public Security → Private Security
information type: Private Security → Public
information type: Public → Private Security
information type: Private Security → Public Security
Revision history for this message
Bryce Harrington (bryce) wrote :

The version of clamav in focal has the required fix:

clamav-gu$ grep ReceiveTimeout shared/optparser.c
    {"ReceiveTimeout", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 0, NULL, 0, OPT_FRESHCLAM, "Timeout in seconds when reading from database server.", "0"},

Full patch as landed upstream is:
https://github.com/Cisco-Talos/clamav-devel/commit/2fd28e1d09f6a563564b61923e62338308e44466

Changed in clamav (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
cwf3wfwfswf (vdvegegeg-deactivatedaccount) wrote :

thanks bryce.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.