Wednesday, July 21, 2021

PSA: FreshClam database download issue

We've received several reports of users experiencing issues with FreshClam triggered by last week's update to the main and daily CVD databases

FreshClam's primary advantage over tools like wget and curl, in addition to automatic testing of new databases, is the ability to perform an incremental update using database patch files. But when a database change is so large that a patch file is not efficient, we issue an empty patch file. This empty file will cause FreshClam to download the entire database instead. Unfortunately, our recent update using the empty patch file method has revealed a couple of issues. 

One of our users discovered that their FreshClam, version 0.103.2 installed from Ubuntu, times out during the download when attempting to download the new daily.cvd and main.cvd databases. This timeout is causing a loop where FreshClam attempts to perform an incremental update and receives the empty patch file, which triggers a whole file download. That download fails and triggers another incremental update, and so on.

If you are experiencing this same issue, the simplest solution is to delete your signature databases from /var/lib/clamav. Then, make sure your FreshClam configuration in /etc/clamav/freshclam.conf either has the ReceiveTimeout option set sufficiently high (E.g. 300 seconds). Alternatively, users can remove the ReceiveTimeout option entirely to disable the timeout. 

After making these changes, you may re-enable your FreshClam service or run freshclam manually and you should find that it is working correctly again.

We apologize for any inconveniences this issue may have caused.