[SOLVED] c-icap, clamav & size limit

Started by Waschbuesch, September 19, 2017, 11:52:46 PM

Previous topic - Next topic
September 19, 2017, 11:52:46 PM Last Edit: September 27, 2017, 03:14:14 PM by franco
Hi there,

Just saw the following on my firewall at home (OPNsense 17.7.3-amd64):
I have enabled c-icap, clamav and transparent squid (for SSL too) like detailed in the online manual.
What happened is that a large download (XCode update on my Mac) was not bypassed but written to /var/tmp/CI_TMP_XXXX and filled up the disk completely. (the download in question is >5G in size).
Should the configured size-limits for both c-icap and clamav not prevent this sort of thing?

Do you have some additional errors in your logs you can provide?



Wow, that was quick.

Thanks everyone!

:)

All shipped in 17.7.4, yes. 8)


Cheers,
Franco

October 03, 2017, 04:55:59 PM #6 Last Edit: October 03, 2017, 04:59:57 PM by Stephan
Hi,

I think we need to reopen this... just ran into the same issue - testfile download of 10gb and it was stored locally to /var/tmp/CI_TMPxxx... though the max file size was set to 5mb in cicap

any help appreciated!

Cheers, Stephan

Edit:
Tue Oct  3 16:56:59 2017, 37144/3376520192, Cannot write to file: No space left on device

October 03, 2017, 06:20:33 PM #7 Last Edit: October 03, 2017, 06:33:26 PM by Stephan
Ok, after some diggin I found this in the /usr/local/etc/c-icap/virus_scan.conf


ServiceAlias  avscan virus_scan?allow204=on&sizelimit=off&mode=simple


According to http://c-icap.sourceforge.net/install.html
sizelimit=off means:
sizelimit=off to ignore srv_clamav.MaxObjectSize directive in c-icap.conf file

...

Is this the Problem?

Cheers, Stephan

EDIT: Just tested it by removing &sizelimit=off and the big file download started correctly by the browser (used http://speed.hetzner.de/ )