Bug 1539107

Summary: file does not report clamav database file versions properly
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: fileAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 28CC: jkaluza, kdudka, macermak, sergio
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: file-5.33-10.fc29 file-5.33-7.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-22 03:03:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
[PATCH] magic: support longer version strings for clamav database none

Description Orion Poplawski 2018-01-26 16:47:36 UTC
Description of problem:

# file /var/lib/clamav/daily.cvd
/var/lib/clamav/daily.cvd: Clam AntiVirus database 08 Jan 2018 16-17 -0500, version2420, gzipped

But the header of the file is:

ClamAV-VDB:08 Jan 2018 16-17 -0500:24204:1820280:63:581a1410813ce37d1b6ee123b7f2e8ca:kH1EdruJV9T90+8H7HlRfppjd99Qfh0zQq2EUMPtSabQU9mdsnPO7IbYRAYO1EN+ALbkey873vrD4N8vTy7p8tjGW7268pBbZde5Lj0PvyDKuiByJ7pXdeCPndaPCAjIOirrfSqL3G7fqt1+Rtv5ITCS8vcQr3+jAfLnbEnUiU:neo:1515446246

Indicating that the version is 24204.  Also, there used to be a space between "version" and the number:

Clam AntiVirus database 26 Jan 2018 04-24 -0500, version 2425, gzipped

Version-Release number of selected component (if applicable):
file-5.32-1.fc28.x86_64

I would have reported upstream, but gw.com does not appear to be responding.

Comment 1 Fedora End Of Life 2018-02-20 15:36:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Kamil Dudka 2018-05-28 10:40:54 UTC
(In reply to Orion Poplawski from comment #0)
> Description of problem:
> 
> # file /var/lib/clamav/daily.cvd

I do not have access to such a file, so it is difficult to debug for me.

> I would have reported upstream, but gw.com does not appear to be responding.

It is a known issue.  Please try to contact the upstream maintainer directly:

    christos <at> zoulas <dot> com

Comment 3 Sergio Basto 2018-07-11 01:04:36 UTC
(In reply to Kamil Dudka from comment #2)
> (In reply to Orion Poplawski from comment #0)
> > Description of problem:
> > 
> > # file /var/lib/clamav/daily.cvd
> 
> I do not have access to such a file, so it is difficult to debug for me.
> 
> > I would have reported upstream, but gw.com does not appear to be responding.
> 
> It is a known issue.  Please try to contact the upstream maintainer directly:
> 
>     christos <at> zoulas <dot> com

the files in question : 

http://database.clamav.net/main.cvd
http://database.clamav.net/daily.cvd
http://database.clamav.net/bytecode.cvd

Comment 4 Kamil Dudka 2018-07-16 11:11:57 UTC
Thanks!  I have posted the below patch to the upstream maintainer.

Comment 5 Kamil Dudka 2018-07-16 11:12:35 UTC
Created attachment 1459126 [details]
[PATCH] magic: support longer version strings for clamav database

... and remember to put a space between "version" and the number

This approach is likely not going to scale in long term but I am not
sure how to encode the version number parsing in a better way.

Comment 6 Kamil Dudka 2018-07-17 10:20:12 UTC
upstream commit:

https://github.com/file/file/commit/1a7f58c9

Comment 8 Fedora Update System 2018-07-17 10:55:43 UTC
file-5.33-7.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-79bf4a4890

Comment 9 Fedora Update System 2018-07-19 20:18:32 UTC
file-5.33-7.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-79bf4a4890

Comment 10 Fedora Update System 2018-07-22 03:03:06 UTC
file-5.33-7.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.