First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 187841
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Net-Mail Packages <net-mail@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ng, Wey-Han <weyhan@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 187841 depends on: Show dependency tree
Bug 187841 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-08-05 20:20 0000
mail-mta/ssmtp package is installed with the /etc/ssmtp/ssmtp.conf as 0644
root:root. If the smtp server use to send mail requires login, the username and
password will be stored in the ssmtp.conf file. Attempts to secure the
ssmtp.conf file to make it 0600 root:root will cause ssmtp to fail for all
users other then the owner of /etc/ssmtp/ssmtp.conf (in this case root).

System software like sys-power/nut will fail to send email notification because
the upsmon process that sends email notification is running as user nut.

Reproducible: Always

Steps to Reproduce:
1. Emerge and setup ssmtp
2. Change permission of /etc/ssmtp/ssmtp.conf to 0600
3. Send email with sendmail on a user account other then root

Actual Results:  
Email send fail because ssmtp could not open /etc/ssmtp/ssmtp.conf

Expected Results:  
Email send successfully.

Software and versions where problem was noticed:
mail-mta/ssmtp-2.61-r2
sys-power/nut-2.0.5-r2

Proposal:

Add a new group e.g. ssmtp or sendmail and make /etc/ssmtp/ssmtp.conf ownership
to be root:ssmtp and permission 0600. Admin can then chose to allow certain
users permission to send email by adding those users to the ssmtp (or sendmail)
group.

------- Comment #1 From Jakub Moc (RETIRED) 2007-08-05 20:30:02 0000 -------

*** This bug has been marked as a duplicate of bug 132376 ***

------- Comment #2 From Ng, Wey-Han 2007-08-05 20:48:13 0000 -------
Jakub,

The bug 132376 which you have marked this one a dup of is about something very
different. Bug 132376 is about the ssmtp with the -v flag showing the username
and password.

This one I’ve filed is to get ssmtp installed with different permission and
maybe a new group for the config file.

Please reconsider removing the dup status.

------- Comment #3 From Jakub Moc (RETIRED) 2007-08-05 21:04:58 0000 -------
(In reply to comment #2)
> This one I’ve filed is to get ssmtp installed with different permission and
> maybe a new group for the config file.

Well, if you read the other bug more carefully, you'll notice that it won't
help at all, since the password will still leak.

------- Comment #4 From Ng, Wey-Han 2007-08-05 21:51:29 0000 -------
(In reply to comment #3)
> Well, if you read the other bug more carefully, you'll notice that it won't
> help at all, since the password will still leak.

I did read that other bug carefully and not only the description but all the
comments as well. Please don't make those assumptions.

The username and password leak via the -v mode would be a problem if I
configure ssmtp to allow anyone to have access to ssmtp but that's not what I'm
trying to do. I'm trying to configure the system to allow non-loginable users
to have the ability to send mail, like the nut user.

Actually if you think about it, if I add a user to the ssmtp group as I've
proposed, it would mean that I knowingly and purposefully allowed the user to
have permission to read the /etc/ssmtp/ssmtp.conf file. Exploiting the -v flag
bug is actually a more difficult means to obtain the password in this case
because the password output from ssmtp verbose mode is base64 encoded.

------- Comment #5 From Ng, Wey-Han 2007-09-01 20:29:41 0000 -------
I've reopen the bug so that someone will answer to my comment above.

Please understand that I am by no means trying to push this through no matter
what. Also, I'm not trying to fix the world's problem with this bug report.
Just a specific scenario that is different from the bug 132376. If my
suggestion fix is not acceptable, please tell me so and also tell me why,
instead of just marking this bug as dup to another bug that is not really
related and tell me that it does not matter.

All I ask is to treat me and my bug report as you would want me to treat gentoo
developers.

------- Comment #6 From Tobias Scherbaum 2008-06-10 20:14:53 0000 -------
(In reply to comment #5)
> I've reopen the bug so that someone will answer to my comment above.
> 
> Please understand that I am by no means trying to push this through no matter
> what. Also, I'm not trying to fix the world's problem with this bug report.
> Just a specific scenario that is different from the bug 132376. If my
> suggestion fix is not acceptable, please tell me so and also tell me why,
> instead of just marking this bug as dup to another bug that is not really
> related and tell me that it does not matter.

Though i'm not sure if that's the "common" case it's of course necessary and an
important part of system-securtiy to protect sensible data from leaking by
accident.

This is fixed in ssmtp-2.62.

------- Comment #7 From Ng, Wey-Han 2008-06-10 20:29:49 0000 -------
(In reply to comment #6)
> Though i'm not sure if that's the "common" case it's of course necessary and an
> important part of system-securtiy to protect sensible data from leaking by
> accident.
> 
> This is fixed in ssmtp-2.62.

Thanks! Although this is a small bug and presumably an easy fix, I really do
appreciate it.

------- Comment #8 From David Sparks 2008-09-30 21:21:15 0000 -------
Creating a ssmtp group is the wrong way to fix the data leakage problem.  I
really don't feel like going over 70 servers adding users to the ssmtp group
...

------- Comment #9 From Dan C 2008-10-03 08:08:01 0000 -------
Agree with #8. ssmtp is supposed to be a replacement for /usr/sbin/sendmail,
and that has traditionally always been available to all users on the system.

I think this "security feature" (requiring membership of the ssmtp group)
should be USE enabled, and not by default, so that users who aren't susceptible
to the privacy leak (anyone who isn't making ssmtp authenticate) don't have to
pay the penalty of stuffing around with group membership.

The real solution would be to make ssmtp setuid root and have it drop privs
after reading its config, or something, but that would add a lot of complexity
to what is supposed to be a *dead-simple* MTA-replacement. I would suggest that
the original reporter's problem can best be solved by using a real MTA, leaving
the rest of us with a simple and working sendmail-replacement.

------- Comment #10 From Karl-Johan Karlsson 2008-10-11 06:32:08 0000 -------
I agree with comment #9. I, and my users, find breaking a working setup like
this inappropriate.

------- Comment #11 From Ed Wildgoose 2008-10-25 10:02:55 0000 -------
Can the ebuild perhaps be changed to propose a way to get back to the old
behaviour, ie is there a simple way to make everyone part of the ssmtp group? 
In many cases ssmtp is only being used where security is largely a non issue

First Last Prev Next    No search results available      Search page      Enter new bug