Description of problem: clamscan is not respecting --max-filesize or MaxFileSize limit Version-Release number of selected component (if applicable): clamav-0.103.0-1.fc32 How reproducible: 100% Steps to Reproduce: [user@localhost ~]$ fallocate --length 5G bigfile; [user@localhost ~]$ clamscan --max-filesize=1M --max-scansize=1M 'bigfile'; LibClamAV Error: CRITICAL: fmap() failed /home/user/bigfile: Can't allocate memory ERROR ----------- SCAN SUMMARY ----------- Known viruses: 8937614 Engine version: 0.103.0 Scanned directories: 0 Scanned files: 0 Infected files: 0 Total errors: 1 Data scanned: 0.00 MB Data read: 5120.00 MB (ratio 0.00:1) Time: 16.448 sec (0 m 16 s) Start Date: 2020:11:15 09:24:57 End Date: 2020:11:15 09:25:14 [user@localhost ~]$ echo $?; 2 Actual results: files larger than the limit aren't being skipped, resulting in error messages Expected results: files larger than the limit should be skipped Additional info: this is especially problematic for me because my nightly malware scan is returning errors every night since this package was updated.
So you think this is a regression and was working before with 0.102.4?
It does indeed seem to be a regression with respect to generation of errors (although it's worth pointing out it appears both versions spend time looking at the file). Here's the result after downgrading to the version you mention ... [user@localhost ~]$ fallocate --length 5G bigfile; [user@localhost ~]$ clamscan --max-filesize=1M --max-scansize=1M 'bigfile'; /home/user/bigfile: OK ----------- SCAN SUMMARY ----------- Known viruses: 8940784 Engine version: 0.102.4 Scanned directories: 0 Scanned files: 1 Infected files: 0 Data scanned: 0.00 MB Data read: 5120.00 MB (ratio 0.00:1) Time: 16.255 sec (0 m 16 s) [user@localhost ~]$ echo $?; 0
if so (it is an regression) we should report it upstream I didn't find any bug report related [1] [1] https://bugzilla.clamav.net/buglist.cgi?classification=ClamAV&list_id=162250&product=ClamAV&query_format=advanced
it appears this is upstream at https://bugzilla.clamav.net/show_bug.cgi?id=12374 , where i've added a comment.
(In reply to uggadri from comment #4) > it appears this is upstream at > https://bugzilla.clamav.net/show_bug.cgi?id=12374 , where i've added a > comment. good catch, thanks
Hum, but the original report is about 0.100.3, we already had versions 0.101.x and 0.102.x , now we are testing 0.103.0
right, but it appears the only thing that's new is that error messages are being produced; the --max-filesize flag appears not to have been respected all along. if that issue is addressed, the fact that error messages are produced on too-large files is moot (and expected behavior anyway).
Here's a bug report from upstream of a certain commit causing the "Can't allocate memory ERROR". Might be useful: https://bugzilla.clamav.net/show_bug.cgi?id=12673
Hi, I just saw that we have a new version of clamav 0.103.1 , we will start do the packages updates . about this bug , I hope upstream can take care of it , I persoanlly think the commit is too big to do something in downstream (here) Thank you for the report.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.