Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 257075
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
pam_krb5-bug257075.patch pam_krb5-bug257075.patch patch Robert Buchholz 2009-01-31 10:46 0000 8.93 KB Details | Diff
pam_krb5-3.9-bug257075.patch pam_krb5-3.9-bug257075.patch patch Robert Buchholz 2009-01-31 10:46 0000 4.13 KB Details | Diff
pam_krb5-3.12.ebuild new pam_krb5 ebuild text/plain Michael Hammer 2009-02-01 17:40 0000 825 bytes Details
pam_krb5-3.12-CVE-20090211.patch removed NEWS file from patch - simple to maintain over different releases patch Michael Hammer 2009-02-01 17:41 0000 7.14 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 257075 depends on: Show dependency tree
Bug 257075 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: 2009-01-31 10:37 0000
** Please note that this issue is confidential and no information should be
disclosed until it is made public, see "Whiteboard" for a date **

Russ Allbery wrote:
The following two vulnerbilities are present in all versions of my
pam-krb5 module prior to 3.13:

* When linked with MIT Kerberos, pam-krb5 did not use the correct API for
  initializing the Kerberos libraries in a setuid context.  This meant the
  MIT Kerberos libraries would trust environmental variables to locate the
  Kerberos configuration.  An attacker could exploit this to bypass
  authentication checks in setuid applications using PAM for
  authentication, resulting in privilege escalation.  This vulnerability
  was not present if pam-krb5 was linked with the Heimdal Kerberos
  implementation.

* pam_setcred with PAM_REINITIALIZE_CREDS or PAM_REFRESH_CREDS is used to
  refresh existing credentials for a user, such as when releasing a locked
  screen.  It therefore honors the existing KRB5CCNAME environment
  variable to locate the existing Kerberos credential cache.  This means,
  however, that if those APIs were called by a setuid application without
  first calling PAM_ESTABLISH_CREDS or dropping privileges, pam-krb5 may
  overwrite and chown the file specified by KRB5CCNAME to an attacker.
  This PAM calling sequence is unusual, but it's known to be used by
  Solaris 10 su.  pam-krb5 3.13 and later will log an error message and
  return success without taking any action when a program attempts to
  reinitialize credentials in a setuid context.

------- Comment #1 From Robert Buchholz 2009-01-31 10:45:33 0000 -------
Russ provided us with both patches for git HEAD (probably to apply on 3.12) and
3.09/3.10. Please prepare an ebuild applying either of those patches (i.e.
version bump or revision bump, your choice) and attach it to this bug. Do not
commit anything to CVS!
We will do prestable testing on this bug.

I have a few more details that I would forward to anyone of you in CC working
on this bug, so please shout out if you're there.

Furthermore, do we other Kerberos-enabled PAM plugins (i.e. the sourceforge
one?). I know we had before, just want to make sure we do not anymore.

------- Comment #2 From Robert Buchholz 2009-01-31 10:46:35 0000 -------
Created an attachment (id=180390) [details]
pam_krb5-bug257075.patch

------- Comment #3 From Robert Buchholz 2009-01-31 10:46:56 0000 -------
Created an attachment (id=180392) [details]
pam_krb5-3.9-bug257075.patch

------- Comment #4 From Michael Hammer 2009-02-01 09:38:33 0000 -------
I'd say that' my job as kerberos maintainer.

Related to http://www.eyrie.org/~eagle/software/pam-krb5/ the latest stable
release is still 3.12 (and not 3.13) therefore I'd say we provide a 3.12
release bump with the patch included. Give me some hours - I am visiting my
family ATM.

greets, mueli

------- Comment #5 From Robert Buchholz 2009-02-01 10:44:14 0000 -------
(In reply to comment #4)
> Related to http://www.eyrie.org/~eagle/software/pam-krb5/ the latest stable
> release is still 3.12 (and not 3.13)

Yep, 3.13 is coming out on Feb. 11 (the embargo date).

------- Comment #6 From Michael Hammer 2009-02-01 17:40:33 0000 -------
Created an attachment (id=180571) [details]
new pam_krb5 ebuild

------- Comment #7 From Michael Hammer 2009-02-01 17:41:05 0000 -------
Created an attachment (id=180573) [details]
removed NEWS file from patch - simple to maintain over different releases

------- Comment #8 From Michael Hammer 2009-02-01 17:43:30 0000 -------
ebuild compiles on my environments and functionality is ok - security bug not
tested by myself. I've renamed the patch and removed the NEWS file from the
patch because this file is simply not patchable with one patch over multiple
releases.

Don't hesitate to tell me if you need something more.

greets, mueli

------- Comment #9 From Michael Hammer 2009-02-01 17:47:05 0000 -------
BTW: I am not maintaining any other pam module for kerberos and I don't know of
any other in our tree - but I might have missed some ... so if you know one
more, please tell me!

------- Comment #10 From Michael Hammer 2009-02-01 17:47:44 0000 -------
Sry - clicking to fast

------- Comment #11 From Diego E. 'Flameeyes' Pettenò 2009-02-01 18:12:04 0000 -------
FWIW I have no idea about Kerberos, I can tell you that sys-libs/pam does not
have any kerberos bits though.

------- Comment #12 From Robert Buchholz 2009-02-02 11:39:34 0000 -------
Arch Security Liaisons, please test the attached ebuild and report it stable on
this bug.

Ebuild:
=sys-auth/pam_krb5-3.12

Note you only need the last two atached files.

Target keywords : "amd64 ppc sparc x86"

CC'ing current Liaisons:
   amd64 : keytoaster, tester
     ppc : dertobi123
   sparc : fmccor
     x86 : maekke, armin76

------- Comment #13 From Markus Meier 2009-02-04 20:26:45 0000 -------
looks good on amd64/x86.

------- Comment #14 From Robert Buchholz 2009-02-12 04:45:35 0000 -------
Public via http://thread.gmane.org/gmane.comp.encryption.kerberos.general/13398

mueli, please bump in the tree and commit straight to stable for the arches
that responded here. We'll add the others afterwards.

------- Comment #15 From Michael Hammer 2009-02-12 09:34:59 0000 -------
Done.

Pushed 3.13 as unstable into tree. I'd suggest to stable this one - what do you
think?

g, Michael

------- Comment #16 From Robert Buchholz 2009-02-12 10:53:57 0000 -------
(In reply to comment #15)
> Done.
> 
> Pushed 3.13 as unstable into tree. I'd suggest to stable this one - what do you
> think?

Judging from the ChangeLog there are no relevant changes for users (allow
building against older Heimdal, figure out libdir if kerberos does not provide
pkgconfig), so I'm hesitant to cause upgrades for them and work for amd64/x86
again. However, this is at your discretion. But feel free to add ppc and sparc
for either version to this bug.

Also, can you please rename the patch to be
pam_krb5-3.12-CVE-2009-0361-0362.patch or so, because right now it can be
easily mistaken to be a patch for CVE-2009-0211 which would be a different
issue (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0211). Thanks!

------- Comment #17 From Michael Hammer 2009-02-12 13:57:08 0000 -------
ACK - as we have already stabled on x86/amd64 let us finalize for 3.12 release.

Renaming is done.

sparc, ppc - could you please stable pam_krb5-3.12?

greets, mueli

------- Comment #18 From Robert Buchholz 2009-02-12 14:49:11 0000 -------
Arches, please test and mark stable:
=sys-auth/pam_krb5-3.12
Target keywords : "amd64 ppc sparc x86"
Already stabled : "amd64 x86"
Missing keywords: "ppc sparc"

------- Comment #19 From Brent Baude 2009-02-12 16:24:01 0000 -------
ppc done

------- Comment #20 From Stefan Behte 2009-02-13 21:42:24 0000 -------
CVE-2009-0360 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2009-0360):
  Russ Allbery pam-krb5 before 3.13, when linked against MIT Kerberos,
  does not properly initialize the Kerberos libraries for setuid use,
  which allows local users to gain privileges by pointing an
  environment variable to a modified Kerberos configuration file, and
  then launching a PAM-based setuid application.

CVE-2009-0361 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2009-0361):
  Russ Allbery pam-krb5 before 3.13, as used by libpam-heimdal, su in
  Solaris 10, and other software, does not properly handle calls to
  pam_setcred when running setuid, which allows local users to
  overwrite and change the ownership of arbitrary files by setting the
  KRB5CCNAME environment variable, and then launching a setuid
  application that performs certain pam_setcred operations.

------- Comment #21 From Raúl Porcel 2009-02-14 16:33:38 0000 -------
sparc stable

------- Comment #22 From Tobias Heinlein 2009-03-05 20:24:14 0000 -------
GLSA request filed.

------- Comment #23 From Björn 2009-03-10 12:41:08 0000 -------
now users need to kinit manually after unlocking their screens with expired
credentials. we should really think about that effect of the patch. admins
should be warned about this change of behavior.

------- Comment #24 From Michael Hammer 2009-03-17 09:05:42 0000 -------
Hi mastamind!

Do you have another solution for the security issue? If you do have - have you
already discussed the patch with upstream?

Thx, mueli

------- Comment #25 From Pierre-Yves Rofes 2009-03-19 21:18:22 0000 -------
(In reply to comment #24)
> Hi mastamind!
> 
> Do you have another solution for the security issue? If you do have - have you
> already discussed the patch with upstream?
> 
> Thx, mueli
> 
Not sure if he got the reply since he was not cc'ed...

------- Comment #26 From Heath Caldwell 2009-03-23 19:20:17 0000 -------
Any word on stabling 3.13?

------- Comment #27 From Heath Caldwell 2009-03-23 19:51:49 0000 -------
Also, why is the patch named pam_krb5-3.12-CVE-2009-0361-0362.patch when it
fixes CVE-2009-0360 and CVE-2009-0361?

------- Comment #28 From Michael Hammer 2009-03-24 07:45:40 0000 -------
Stabaling pam_krb5-3.13 should be fine - first commit was done on 2009-02-12.
Is this soultion acceptable for the security team?

------- Comment #29 From Robert Buchholz 2009-03-24 10:39:07 0000 -------
(In reply to comment #28)
> Stabaling pam_krb5-3.13 should be fine - first commit was done on 2009-02-12.
> Is this soultion acceptable for the security team?

It does not impact this security bug, but fell free to request a regular
stabling on another bug.

------- Comment #30 From Pierre-Yves Rofes 2009-03-25 22:47:45 0000 -------
(In reply to comment #27)
> Also, why is the patch named pam_krb5-3.12-CVE-2009-0361-0362.patch when it
> fixes CVE-2009-0360 and CVE-2009-0361?
> 
Just an error in the patch filename, nothing important.

This was GLSA 200903-39, thanks everyone.

------- Comment #31 From Alex Legler 2009-05-08 10:26:16 0000 -------
*** Bug 269008 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug