First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 232642
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Robert Buchholz <rbu@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
postfix-link.patch patch for privilege escalation via hardlinked symlinks patch Matthias Geerdsen 2008-07-25 09:52 0000 2.31 KB Details | Diff
2.4.6-r2-2.4.6-r3.diff Diff between 2.4.6-r2 and 2.4.6-r3 text/plain Tobias Scherbaum 2008-07-25 20:25 0000 692 bytes Details
postfix-2.4.6-r3.ebuild postfix-2.4.6-r3.ebuild text/plain Tobias Scherbaum 2008-07-25 20:26 0000 11.54 KB Details
postfix-2.4.7-CVE-2008-2936.patch postfix-2.4.7-CVE-2008-2936.patch patch Robert Buchholz 2008-07-28 19:33 0000 1.83 KB Details | Diff
postfix-2.4.7-CVE-2008-2937.patch postfix-2.4.7-CVE-2008-2937.patch patch Robert Buchholz 2008-07-28 19:34 0000 21.55 KB Details | Diff
postfix-2.4.7-r1-overlay.tar.gz postfix-2.4.7-r1-overlay.tar.gz application/octet-stream Robert Buchholz 2008-07-28 19:35 0000 13.89 KB Details
postfix-2.5.3-r1.ebuild postfix-2.5.3-r1.ebuild text/plain Tobias Scherbaum 2008-08-03 14:46 0000 11.76 KB Details
postfix-2.5.3-CVE-2008-2936.patch postfix-2.5.3-CVE-2008-2936.patch text/plain Tobias Scherbaum 2008-08-03 14:46 0000 1.84 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 232642 depends on: Show dependency tree
Bug 232642 blocks:

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: 2008-07-22 12:00 0000
** Please note that this issue is confidential at the moment and no information
should be disclosed until it is made public **

Sebastian Krahmer of Suse reported that Postfix

(1) checks whether a mailbox is a symlink, but does no do so for root. This
could allow privilege escalation by creating a hardlink to a root-owned symlink
(such as /etc/init.d/net* on Gentoo), and delivering mail to the root user.

(2) does not check whether the mailbox already exists but is owned by a
different user.

------- Comment #1 From Matthias Geerdsen 2008-07-25 09:52:52 0000 -------
Created an attachment (id=161331) [details]
patch for privilege escalation via hardlinked symlinks

suitable for postfix >2.0

------- Comment #2 From Matthias Geerdsen 2008-07-25 10:10:08 0000 -------
CVE-2008-2936 postfix priv esc
CVE-2008-2937 postfix (maybe others) spool file bad permissions

The attached patch is addressing CVE-2008-2936, the other issue will be handled
via "the regular non-emergency release process" probably over this weekend.

Chtekk/dertobi123, could you already prepare an ebuild, simple epatch added to
2.4.6-r2 appears to work alright. I am not sure when the other issue will be
fixed or at what time this patch will be released yet.

Adding robbat2 for infra, in case they might be interested in this.

------- Comment #3 From Tobias Scherbaum 2008-07-25 20:24:11 0000 -------
(In reply to comment #2)
> The attached patch is addressing CVE-2008-2936, the other issue will be handled
> via "the regular non-emergency release process" probably over this weekend.

The patch applies and compiles fine for 2.4.*, but not for 2.5.2 - is there
another patch for 2.5?

> Chtekk/dertobi123, could you already prepare an ebuild, simple epatch added to
> 2.4.6-r2 appears to work alright. I am not sure when the other issue will be
> fixed or at what time this patch will be released yet.

I'm attaching a diff between -r2 and -r3 plus the updated -r3 ebuild. Besides
adding that epatch line I also changed the way the include and library path for
postgres are determined, that fix is used in 2.5.2 since around ~6 weeks and
shouldn't cause any issue when stabling 2.4.6-r3.

------- Comment #4 From Tobias Scherbaum 2008-07-25 20:25:00 0000 -------
Created an attachment (id=161366) [details]
Diff between 2.4.6-r2 and 2.4.6-r3

------- Comment #5 From Tobias Scherbaum 2008-07-25 20:26:44 0000 -------
Created an attachment (id=161368) [details]
postfix-2.4.6-r3.ebuild

------- Comment #6 From Robert Buchholz 2008-07-27 12:01:40 0000 -------
Before cc'ing arch liaisons I would wait for a patch to the other CVE.

------- Comment #7 From Tobias Scherbaum 2008-07-28 05:29:09 0000 -------
Postfix 2.5.3 has been released, the ChangeLog doesn't mention a fix for
CVE-2008-2937.

As for CVE-2008-2936:

20080725

        Paranoia: defer delivery when a mailbox file is not owned
        by the recipient. Requested by Sebastian Krahmer, SuSE.
        Specify "strict_mailbox_ownership=no" to ignore ownership
        discrepancies.  Files: local/mailbox.c, virtual/mailbox.c.

------- Comment #8 From Robert Buchholz 2008-07-28 19:33:59 0000 -------
Created an attachment (id=161569) [details]
postfix-2.4.7-CVE-2008-2936.patch

unified diff

------- Comment #9 From Robert Buchholz 2008-07-28 19:34:44 0000 -------
Created an attachment (id=161570) [details]
postfix-2.4.7-CVE-2008-2937.patch

backported patch from 2.5.3

------- Comment #10 From Robert Buchholz 2008-07-28 19:35:32 0000 -------
Created an attachment (id=161572) [details]
postfix-2.4.7-r1-overlay.tar.gz

tar'ed up overlay

------- Comment #11 From Robert Buchholz 2008-07-28 19:37:49 0000 -------
Tobias: I backported the patch and named them consistently. I'm not sure how
you feel about 2.4.7 going stable, but it seemed easiest to me
documentation-wise. If you could test/approve the attached overlay, we can cc
arches.

Expected embargo date is Aug. 14

------- Comment #12 From Tobias Scherbaum 2008-08-03 14:46:06 0000 -------
Created an attachment (id=162101) [details]
postfix-2.5.3-r1.ebuild

------- Comment #13 From Tobias Scherbaum 2008-08-03 14:46:34 0000 -------
Created an attachment (id=162102) [details]
postfix-2.5.3-CVE-2008-2936.patch

------- Comment #14 From Tobias Scherbaum 2008-08-03 14:51:25 0000 -------
(In reply to comment #11)
> Tobias: I backported the patch and named them consistently. I'm not sure how
> you feel about 2.4.7 going stable, but it seemed easiest to me
> documentation-wise. If you could test/approve the attached overlay, we can cc
> arches.
> 
> Expected embargo date is Aug. 14
> 

As discussed with Robert on IRC i'd prefer to go with 2.5.3(-r1 that is)
instead of backporting the fixes to 2.4.7-r1 because the patch for
CVE-2008-2937 changes postfix' behaviour.

I'd ask all arch teams to test 2.5.3-r1 but also 2.4.7-r1 so we a fallback
option if problems in 2.5.3 show up (i don't expect so, there are no open bugs
reported on 2.5.*) plus updating from 2.4 to 2.5 should be quite simple.

------- Comment #15 From Robert Buchholz 2008-08-03 17:24:47 0000 -------
Arch Security Liaisons, please test the attached ebuild and report it stable on
this bug.
Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"

CC'ing current Liaisons:
   alpha : yoswink
   amd64 : keytoaster
    hppa : jer
     ppc : dertobi123
   ppc64 : corsair
   sparc : fmccor
     x86 : tsunam

------- Comment #16 From Ferris McCormick 2008-08-04 12:51:33 0000 -------
Sparc looks OK.
Built with USE flags:
USE='ldap mailwrapper mysql pam ssl'

------- Comment #17 From Markus Rothe 2008-08-04 19:16:05 0000 -------
looks good on ppc64

------- Comment #18 From Jeroen Roovers 2008-08-04 20:11:26 0000 -------
HPPA is OK for both.

------- Comment #19 From Tobias Heinlein 2008-08-05 15:23:42 0000 -------
Fine on amd64.

------- Comment #20 From Raúl Porcel 2008-08-06 13:02:41 0000 -------
Adding maekke for x86

------- Comment #21 From Raphael Marichez 2008-08-06 17:02:30 0000 -------
I would not rate it A1 because of the very particular conditions needed to
exploit this issue.

By the way, on Gentoo with /var/spool/mail having permissions 775 root:mail,
it's only a (mail group) -> root privilege escalation. And, by default, the
mail group contains no end-user. I'm even not sure Gentoo should be considered
as affected.

------- Comment #22 From Raúl Porcel 2008-08-06 17:15:39 0000 -------
Looks okay on alpha/ia64/x86

------- Comment #23 From Robert Buchholz 2008-08-06 17:52:28 0000 -------
We could rerate it B1 due to the fact that it only affects mbox setups with
users in the "mail" group or /var/mail being 01777. I would consider Gentoo
affected because we do not discourage configurations that would be affected,
even if they are not default.

------- Comment #24 From Raphael Marichez 2008-08-13 13:50:11 0000 -------
(In reply to comment #23)
> We could rerate it B1 due to the fact that it only affects mbox setups with
> users in the "mail" group or /var/mail being 01777. 

OK for B1.

------- Comment #25 From Raphael Marichez 2008-08-14 08:13:36 0000 -------
i'm ready to commit the stuff within a few hours. Every supported arch reported
it's fine. Except ppc for which it has not been validated yet.

Thanks for your efficient work, everybody!

------- Comment #26 From Tobias Scherbaum 2008-08-14 09:00:23 0000 -------
(In reply to comment #25)
> i'm ready to commit the stuff within a few hours. Every supported arch reported
> it's fine. Except ppc for which it has not been validated yet.
> 
> Thanks for your efficient work, everybody!
> 

*cough* of couse it has been validated for ppc :P so yeah, it's good to got for
ppc ;)

------- Comment #27 From Raphael Marichez 2008-08-14 12:22:22 0000 -------
opening to the public domain since it's now public

------- Comment #28 From Raphael Marichez 2008-08-14 22:45:25 0000 -------
And GLSA 200808-12. Thanks for your good work everybody!

------- Comment #29 From Robert Buchholz 2008-10-18 19:10:17 0000 -------
*** Bug 242638 has been marked as a duplicate of this bug. ***

------- Comment #30 From hexa 2008-10-23 13:22:23 0000 -------
Hi,

i have 2.4.9 and glsa-check still reports it as vulnerable.

c1 etc # glsa-check -l | grep "\[N"
[A] means this GLSA was already applied,
[U] means the system is not affected and
[N] indicates that the system might be affected.

200808-12 [N] Postfix: Local privilege escalation vulnerability (
mail-mta/postfix )

c1 etc # equery l postfix
[ Searching for package 'postfix' in all categories among: ]
 * installed packages
[I--] [  ] mail-mta/postfix-2.4.9 (0)

------- Comment #31 From Robert Buchholz 2008-10-23 13:49:12 0000 -------
corrected, thanks.

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