Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1206462

Summary: On RHEL7, the problem occurs if the entry of the file "/etc/passwd" is more than 1024 characters.
Product: Red Hat Enterprise Linux 7 Reporter: kyoneyama <kyoneyam>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: ashankar, fweimer, mnewsome, pfrankli
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-15 08:33:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description kyoneyama 2015-03-27 08:04:12 UTC
Description of problem:

On RHEL7, the problem occurs in the user information acquisition if the entry of the file "/etc/passwd" is more than 1024 characters.

Then, the user cannot log in successfully.

Prior to RHEL7(e.g. RHEL6, RHEL5), it did not occur.


Version-Release number of selected component (if applicable):

- Red Hat Enterprise Linux 7
- glibc-2.17-78.el7

How reproducible:

Always


Steps to Reproduce:
1. Create text file to fill comment field.

   # for i in {1..99}; do echo -n "1234567890" >> list.txt ; done
   # wc list.txt
      0   1 990 list.txt 

2. Add new user adding -c option.

   # useradd -c `cat list.txt` testuser1

3. Check a result of `getent passwd`.

  # getent passwd testuser1

4. Check whether the user can log in.


Actual results:

  # getent passwd testuser1
  testuser1:x:1001:1001:12345678901234567890(..snip..)123456789:/home/test?:


  rhel7-minimal login: testuser1
  Password:
  Last login: Fri Mar 27 15:50:06 JST 2015 on tty2
   -- testuser1: warning: change directory failed: No such file or directory
  Logging in with home = "/".
  -sh-4.2$ 


Expected results:

  # getent passwd testuser1
  testuser1:x:1001:1001:12345678901234567890(..snip..)123456789:/home/testuser1:/bin/bash


  rhel7-minimal login: testuser1
  Password:
  Last login: Fri Mar 27 15:52:06 JST 2015 on tty2
  [testuser1@rhel7-minimal ~]$ 


Additional info:

Comment 2 Florian Weimer 2015-12-11 10:23:44 UTC
(In reply to kyoneyama from comment #0)

> Actual results:
> 
>   # getent passwd testuser1
>   testuser1:x:1001:1001:12345678901234567890(..snip..)123456789:/home/test?:

This looks like bug 1262914 (CVE-2015-5277), which was fixed in this erratum:

  https://rhn.redhat.com/errata/RHSA-2015-2172.html