Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241210 - app-antivirus/clamav-0.94 - clamav-milter socket permissions seems wrong.
Summary: app-antivirus/clamav-0.94 - clamav-milter socket permissions seems wrong.
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-10 23:41 UTC by Ian Kumlien
Modified: 2008-11-13 23:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch itself (clamav-patch.txt,1.50 KB, patch)
2008-10-10 23:43 UTC, Ian Kumlien
Details | Diff
The actual patch i indented for ppl to use. (clamav-milter-0.94.1.patch,1.51 KB, patch)
2008-11-13 22:58 UTC, Ian Kumlien
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Kumlien 2008-10-10 23:41:51 UTC
I did a small fix that changed clamav-milters socket permissions from srwxr-xr-x to srwxrwxrwx

Reproducible: Always




I don't know if this patch is actually correct or if it should be pushed, all i can say is that it fixed my issue when running clamav-milter with postfix.
Comment 1 Ian Kumlien 2008-10-10 23:43:11 UTC
Created attachment 167958 [details, diff]
The patch itself

I use a local static variable to clean up after myself.
Comment 2 Wormo (RETIRED) gentoo-dev 2008-10-13 00:51:37 UTC
If clamav-milter ran as the same user as postfix, the original stricter permissions should work fine. What was the owner of the socket, and what user does your postfix process run as?

Making a socket world-writable is not a good idea for security... 
Comment 3 Ian Kumlien 2008-10-13 06:57:30 UTC
ClamAV runs as clamav while postfix runs as postfix.

I just made it emulate clamd:
srwxrwxrwx  1 clamav clamav    0 11 okt 01.32 clamd.sock
srwxrwxrwx  1 clamav clamav    0 11 okt 01.32 clmilter.sock

afair there is currently no support for switching the user.
And since the data comes from postfix which i doubt does any prechecking, i don't see the point of securing it locally.

clmilter is more of a wrapper for clamd anyways.
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-10 19:25:16 UTC
(In reply to comment #3)
> ClamAV runs as clamav while postfix runs as postfix.
> 
> I just made it emulate clamd:
> srwxrwxrwx  1 clamav clamav    0 11 okt 01.32 clamd.sock
> srwxrwxrwx  1 clamav clamav    0 11 okt 01.32 clmilter.sock
> 
> afair there is currently no support for switching the user.
> And since the data comes from postfix which i doubt does any prechecking, i
> don't see the point of securing it locally.
> 
> clmilter is more of a wrapper for clamd anyways.
> 

did you report this upstream? imho socket permissions are somewhat specific to different setups, having a that socket world writable doesn't sound like a good idea to me ...
Comment 5 Ian Kumlien 2008-11-10 19:30:22 UTC
I really don't see the problem, this is the socket youre usually dumping unknown maildata to... And it looks like it just acts like a wrapper for clamav, which has those permissions by default.

No, i haven't reported it upstream yet.
Comment 6 Ian Kumlien 2008-11-12 13:16:58 UTC
Ok, so i got a reply from clamav where they state that it shouldn't be world writable and that clamav-milter should be run as the same user as your 'sendmail' install.

I'll post a summary here when something has been concluded.
Comment 7 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-13 17:56:40 UTC
(In reply to comment #6)
> Ok, so i got a reply from clamav where they state that it shouldn't be world
> writable and that clamav-milter should be run as the same user as your
> 'sendmail' install.
> 
> I'll post a summary here when something has been concluded.
> 

As a agree with that reply you got from upstream I'm marking this bug as wontfix for now. Feel free to reopen if upstream says it's ok to change the socket permissions as suggested.
Comment 8 Ian Kumlien 2008-11-13 22:58:25 UTC
Created attachment 171665 [details, diff]
The actual patch i indented for ppl to use.
Comment 9 Ian Kumlien 2008-11-13 23:00:22 UTC
I never intended it to be a world writable socket, i just got confused that that was the major issue. This patch opens it as a group socket thing.

The problem with running this as postfix is that you either have to change the owner for all of clamav or botch your own init scripts since gentoo doesn't support running clamav-milter as another user.

Adding group writable is a easy fix however, since you only have to add postfix to the clamav group.