Bug 228722 - [RHEL4] [patch] cid-10 Add missing NULL check to e2fsck_get_dir_info()
[RHEL4] [patch] cid-10 Add missing NULL check to e2fsck_get_dir_info()
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eric Sandeen
Jay Turner
:
Depends On:
Blocks: 234251 239341
  Show dependency treegraph
 
Reported: 2007-02-14 12:02 EST by Bryn M. Reeves
Modified: 2015-01-07 19:15 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0758
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 11:01:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
e2fsck - check return value of e2fsck_get_dir_info() (814 bytes, patch)
2007-02-14 12:02 EST, Bryn M. Reeves
no flags Details | Diff

  None (edit)
Description Bryn M. Reeves 2007-02-14 12:02:18 EST
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 12:02:19 EST
Created attachment 148068 [details]
e2fsck - check return value of e2fsck_get_dir_info()
Comment 4 Eric Sandeen 2007-05-29 16:33:10 EDT
upstream commit http://thunk.org/hg/e2fsprogs/?rev/dcaef25d7a55
Comment 6 Benjamin Kahn 2007-06-08 10:37:47 EDT
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 16:43:47 EDT
In cvs as of e2fsprogs-1.35-12.7.el4
Comment 12 errata-xmlrpc 2007-11-15 11:01:42 EST
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.