-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increasing file size does not work with daemon + Clamscan "INSTREAM: Size limit reached, (requested: 65536, max: 0)" #131
Comments
What method are you using to scan the file(s)? |
@kylefarris yes, Can you confirm it is possible to scan slightly larger files with clamscan in general? If so, I would look for other issues within my setup. |
@philly-vanilly I'm able to scan a 78 MB DMG file just fine on MacOS just fine 🙂 No special configurations. The config file for my daemon has the defaults for the items you listed above:
I scanned the large file via |
@kylefarris I have reduced my setup to a minimal POC but I still cannot scan big files unlike small ones. Could you please share your configuration? Or perhaps you see anything within mine that looks weird? Here is my Dockerfile:
with the sh script being
and I execute the scan with this function:
which for now is being called in jest:
I get a proper response for a small file, but for a big one, process terminates with
|
Are you able to scan the large file locally using the command line? You can use Assuming you have telnet installed, type in: telnet 0.0.0.0 3310 Then, assuming it connects, type the following in and press Enter: nSCAN /Users/.../big-file.pdf It should take a second and then respond with something like this and immediately close the socket: /Users/.../big-file.pdf: OK Mine throws an inconsequential If it gives you the |
I am using google-cloud-sdk/slim docker image with this config (note the non default size limits):
and
But all scan attempts of a 30 MB size file end in the titular error. I have tried multiple NodeJS clients (clamscan, clamdjs) and it is the same error, so I believe the problem is with the daemon itself. What is surprising is that the error says "max: 0" but 0 either means that there is no limit at all or it really is 0, but if it was 0, I would not be able to scan files below 25MB. But other ClamScan users have also reported on this: Cisco-Talos/clamav#1210 But I thought a slightly higher file size should be no problem. Others seem to use ClamAV for files with GB size, although perhaps not with NodeJS.
The error seems to be present in other (python) integrations as well: Cisco-Talos/clamav#942
The only hint with upvotes I could find was for the C# client https://stackoverflow.com/questions/39371037/how-change-limit-file-size-of-clamd-service-for-nclam that seems to have the option "MaxStreamSize = 52428800" in addition to the clamd configuration. Is ClamScan perhaps missing a buffering option?
How can I proceed here? Has anyone got clamscan to work with even slightly bigger files?
The text was updated successfully, but these errors were encountered: