Bug 177331 - CVE-2006-7108 login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped.
Summary: CVE-2006-7108 login omits pam_acct_mgmt & pam_chauthtok when authentication i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: util-linux
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
URL:
Whiteboard: source=bugzilla,reported=20060109,pub...
Depends On:
Blocks: 176344
TreeView+ depends on / blocked
 
Reported: 2006-01-09 19:03 UTC by Craig Lawson
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHSA-2007-0235
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-01 17:17:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0235 0 normal SHIPPED_LIVE Low: util-linux security and bug fix update 2007-05-01 17:15:07 UTC

Description Craig Lawson 2006-01-09 19:03:10 UTC
Description of problem:
login omits pam_acct_mgmt & chauth_tok when authentication is skipped.
Authentication may be skipped, for example, during krlogin because Kerberos
already took care of it. The problem with skipping pam_acct_mgmt is that it
allows users to use the system when maybe they should not be allowed, such that
if they have a Kerberos ticket, the other checks do not apply.

If a user had to use password authentication, pam_acct_mgmt may reject the user
for several reasons: not allowed to use the system at this time, not allowed to
use this system, user's account has been disabled, etc. Why should these tests
be skipped just because the user has a ticket?

Same with pam_chauthtok: the user may have a valid ticket, but if their password
has expired, they need to enter a new one right now.

Version-Release number of selected component (if applicable):
util-linux-2.12a-16.EL4.12

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Here is a patch:
***************
*** 634,650 ****
  	    fprintf(stderr,_("\nLogin incorrect\n"));
  	    pam_end(pamh, retcode);
  	    exit(0);
  	}
  
  	retcode = pam_acct_mgmt(pamh, 0);
  
  	if(retcode == PAM_NEW_AUTHTOK_REQD) {
  	    retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
  	}
  
  	PAM_FAIL_CHECK;
-     }
  
      /*
       * Grab the user information out of the password file for future usage
       * First get the username that we are actually using, though.
--- 634,650 ----
  	    fprintf(stderr,_("\nLogin incorrect\n"));
  	    pam_end(pamh, retcode);1
  	    exit(0);
  	}
+     }
  
      retcode = pam_acct_mgmt(pamh, 0);
  
      if(retcode == PAM_NEW_AUTHTOK_REQD) {
          retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
      }
  
      PAM_FAIL_CHECK;
  
      /*
       * Grab the user information out of the password file for future usage
       * First get the username that we are actually using, though.

Comment 1 Craig Lawson 2006-01-09 19:31:18 UTC
That patch was for login.c, after all RedHat patches have been applied.

Comment 2 Karel Zak 2006-02-07 09:49:39 UTC
Good catch. Please, use "diff -u" next time. Thanks!

Comment 3 Karel Zak 2006-02-22 21:00:50 UTC
Fixed in FC5.

Comment 10 RHEL Program Management 2006-08-18 16:49:05 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 16 Mark J. Cox 2007-03-08 13:11:26 UTC
Note was assigned CVE-2006-7108

Comment 21 Red Hat Bugzilla 2007-05-01 17:17:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0235.html



Note You need to log in before you can comment on or make changes to this bug.