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 - On RHEL7, the problem occurs if the entry of the file "/etc/passwd" is more than 1024 characters.
Summary: On RHEL7, the problem occurs if the entry of the file "/etc/passwd" is more t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Carlos O'Donell
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-27 08:04 UTC by kyoneyama
Modified: 2019-12-16 04:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-15 08:33:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1290689 0 high CLOSED util-linux: /bin/login does not retry getpwnam_r with larger buffers, leading to login failure 2021-02-22 00:41:40 UTC

Internal Links: 1290689

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


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