Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 228722 - [RHEL4] [patch] cid-10 Add missing NULL check to e2fsck_get_dir_info()
Summary: [RHEL4] [patch] cid-10 Add missing NULL check to e2fsck_get_dir_info()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Eric Sandeen
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks: 239341
TreeView+ depends on / blocked
 
Reported: 2007-02-14 17:02 UTC by Bryn M. Reeves
Modified: 2018-10-19 22:58 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0758
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 16:01:42 UTC


Attachments (Terms of Use)
e2fsck - check return value of e2fsck_get_dir_info() (deleted)
2007-02-14 17:02 UTC, Bryn M. Reeves
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0758 normal SHIPPED_LIVE e2fsprogs bug fix update 2007-11-14 17:06:52 UTC

Description Bryn M. Reeves 2007-02-14 17:02:18 UTC
Description of problem:
e2fsck calls e2fsck_get_dir_info() to retrieve directory information, but it is
possible that e2fsck_get_dir_info() returns a NULL pointer. We do not want to
blow up when dereferencing p.  It seems to be more sane/safe to call
fix_problem(ctx, PR_3_NO_DIRINFO, pctx) if p is NULL at this point since we do
not have any DIRINFO for pctx->ino.

Version-Release number of selected component (if applicable):
e2fsprogs-1.35-12.4.EL4

How reproducible:
Difficult - currently don't have a way to trigger this one easily, but the flaw
is fairly obvious. 
  
Actual results:
e2fsck may dereference a NULL pointer.

Expected results:
e2fsck checks return value and avoids dereferencing a NULL.

Comment 1 Bryn M. Reeves 2007-02-14 17:02:19 UTC
Created attachment 148068 [details]
e2fsck - check return value of e2fsck_get_dir_info()

Comment 4 Eric Sandeen 2007-05-29 20:33:10 UTC
upstream commit http://thunk.org/hg/e2fsprogs/?rev/dcaef25d7a55

Comment 6 Benjamin Kahn 2007-06-08 14:37:47 UTC
Applying a DEV_ACK for Eric Sandeen <sandeen@redhat.com>.  This bug
    was found by coverity and has a patch available.

Comment 8 Eric Sandeen 2007-07-02 20:43:47 UTC
In cvs as of e2fsprogs-1.35-12.7.el4

Comment 12 errata-xmlrpc 2007-11-15 16:01:42 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/RHBA-2007-0758.html



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