Bug 425941 - vol_id loops forever if it founds a malformed line in /etc/passwd
Summary: vol_id loops forever if it founds a malformed line in /etc/passwd
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: udev   
(Show other bugs)
Version: 5.1
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Harald Hoyer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-12-17 10:45 UTC by Marco Ceci
Modified: 2008-05-21 15:59 UTC (History)
0 users

Fixed In Version: RHBA-2008-0374
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 15:59:30 UTC
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 10:45 UTC, Marco Ceci
no flags Details | Diff
patch for the source of the loop (557 bytes, patch)
2008-01-15 10:55 UTC, 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 13:23:41 UTC

Description Marco Ceci 2007-12-17 10:45:30 UTC
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 10:45:30 UTC
Created attachment 289762 [details]
patch for vol_id that fix the problem

Comment 4 RHEL Product and Program Management 2008-01-08 12:34:47 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

Comment 6 Harald Hoyer 2008-01-15 10:55:42 UTC
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 11:19:08 UTC
Please try:

Comment 11 errata-xmlrpc 2008-05-21 15:59:30 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.


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