Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 425941 - vol_id loops forever if it founds a malformed line in /etc/passwd
vol_id loops forever if it founds a malformed line in /etc/passwd
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: udev (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
  Show dependency treegraph
Reported: 2007-12-17 05:45 EST by Marco Ceci
Modified: 2008-05-21 11:59 EDT (History)
0 users

See Also:
Fixed In Version: RHBA-2008-0374
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 11:59:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for vol_id that fix the problem (1.30 KB, patch)
2007-12-17 05:45 EST, Marco Ceci
no flags Details | Diff
patch for the source of the loop (557 bytes, patch)
2008-01-15 05:55 EST, Harald Hoyer
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0374 normal SHIPPED_LIVE udev bug fix update 2008-05-20 09:23:41 EDT

  None (edit)
Description Marco Ceci 2007-12-17 05:45:30 EST
Description of problem:

/lib/udev/vol_id goes stuck in a loop if founds a malformed line in /etc/passwd

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

Red Hat Enterprise Linux 5.1

How reproducible:


Steps to Reproduce:
1. put a "#" at the beginning of /etc/passwd
2. run /lib/udev/vol_id /dev/sda1
3. vol_id loops forever
Actual results:

vol_id hangs

Expected results:

vol_id should not hang and ignore the malformed line or report an error

Additional info:

the problem is in the get_id_field_by_name (in udev_libc_wrapper.c) that is
expecting a ":" character and loops if it does not find it. The upstream version
of udev is not affected from the problem as they do not use the custom
"lookup_user" function but the libc function getpwnam. I am attaching a patch
with a backport from udev 106-04 that fix the problem but there may be other
udev code apart vol_id that use "lookup_user" function.
Comment 1 Marco Ceci 2007-12-17 05:45:30 EST
Created attachment 289762 [details]
patch for vol_id that fix the problem
Comment 4 RHEL Product and Program Management 2008-01-08 07:34:47 EST
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
Comment 6 Harald Hoyer 2008-01-15 05:55:42 EST
Created attachment 291702 [details]
patch for the source of the loop

Here is another patch, which should fix the source of the problem. lookup_user
is used in several other functions.
Comment 7 Harald Hoyer 2008-01-15 06:19:08 EST
Please try:
Comment 11 errata-xmlrpc 2008-05-21 11:59:30 EDT
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.


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