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.
Created attachment 148068 [details] e2fsck - check return value of e2fsck_get_dir_info()
upstream commit http://thunk.org/hg/e2fsprogs/?rev/dcaef25d7a55
Applying a DEV_ACK for Eric Sandeen <sandeen>. This bug was found by coverity and has a patch available.
In cvs as of e2fsprogs-1.35-12.7.el4
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