Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91426 - mail-filter/amavisd-new insecure file permission
Summary: mail-filter/amavisd-new insecure file permission
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B4 [noglsa] jaervosz
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-04 06:23 UTC by Romang
Modified: 2005-05-12 05:46 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Romang 2005-05-04 06:23:26 UTC
Hello,

the file /etc/amavisd.conf has bad right.

If you use amavisd-new is compiled with mysql or postgresql this file shouldn't be other readable, they are sensitive informations in this file.

Maybe could be chown root:amavis amavisd.conf && chmod 540 amavisd.conf

Also, this is possible that other importante file of amavis are readable or exectuble by all

Regards

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
/etc/amavisd.conf readable by all

Expected Results:  
/etc/amavisd.conf shouldn't be readable by all

How to configure amavisd-new with mysql :

@lookup_sql_dsn =
   ( ['DBI:mysql:maildb:host1', 'mail', 'very_secret_password']  );

(For clarity uncomment the default)
$sql_select_policy = 'SELECT *,users.id FROM users,policy'.
   ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
   ' ORDER BY users.priority DESC';

(If you want sender white/blacklisting)
   $sql_select_white_black_list = 'SELECT wb FROM wblist,mailaddr'.
     ' WHERE (wblist.rid=?) AND (wblist.sid=mailaddr.id)'.
     '   AND (mailaddr.email IN (%k))'.
     ' ORDER BY mailaddr.priority DESC';
Comment 1 Fernando J. Pereda (RETIRED) gentoo-dev 2005-05-04 09:00:03 UTC
Just in case you need net-mail advise, setting sane permissions on /etc/amavisd.conf shouldn't cause any problems. I don't know of other apps that need access to that file

Cheers,
Ferdy
Comment 2 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-04 09:06:54 UTC
Thx Ferdy, I don't need advise (this time), I need an updated ebuild:-)
Comment 3 Andrej Kacian (RETIRED) gentoo-dev 2005-05-04 11:56:13 UTC
Ok, 2.2.1-r2 (latest stable on multiple arches) has been committed to fix this - 0640 permissions are now being used for /etc/amavisd.conf, which is being owned by root:amavis.

I didn't bump unstable version (2.3.0), just modified it.
Comment 4 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-04 23:15:13 UTC
Thx everyone, this is ready for GLSA decision.

I vote for NO GLSA.
Comment 5 eromang 2005-05-06 14:52:06 UTC
A message to warn sysadmin could be good, no need of GLSA i think
Comment 6 Andrej Kacian (RETIRED) gentoo-dev 2005-05-06 15:29:47 UTC
Right, as portage doesn't change the permissions of an existing file in /etc, we need to tell the admin to do it himself. Too bad.
Comment 7 Andrej Kacian (RETIRED) gentoo-dev 2005-05-06 15:51:44 UTC
ewarn message added to both 2.2.1-r2 and 2.3.0.
Comment 8 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-07 01:42:39 UTC
Adding Marius so he can comment.
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2005-05-07 03:11:47 UTC
Well, you could change it in pkg_postinst. Just be minimal invaise there (so prefer `chmod o-rwx` over `chmod 640`), otherwise people might get pissed that you're grant permissions instead of removing them (in case they did a chmod 600 for example).
Comment 10 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-07 10:25:36 UTC
Thx Marius.

Ticho I believe this should be added as well, back to ebuild status.
Comment 11 Andrej Kacian (RETIRED) gentoo-dev 2005-05-08 02:05:47 UTC
Ok, committed. Thanks, Marius.
Comment 12 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-08 05:00:15 UTC
Thx Thico.

Back to glsa? One NO vote so far.
Comment 13 Andrej Kacian (RETIRED) gentoo-dev 2005-05-08 11:30:25 UTC
NO from me as well.
Comment 14 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-11 07:21:31 UTC
Sorry only Security Team members vote count officially. So please vote.
Comment 15 Thierry Carrez (RETIRED) gentoo-dev 2005-05-12 05:46:52 UTC
Voting NO and closing.