bugfindutils - Bugs: bug #16378, find aborts on file with mode 0000

 
 

bug #16378: find aborts on file with mode 0000

Submitter:  None
Submitted:  Wed 19 Apr 2006 04:28:36 AM UTC
   
 
Category:  find Severity:  6 - Security
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Davyd Madeley Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.27
Fixed Release:  4.3.5
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 May 2007 11:17:03 AM UTC, comment #4: 

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the
next official release of findutils, or check out a copy
of the code from the CVS repository for findutils.

James Youngman <jay>
Group administrator
Wed 19 Apr 2006 12:23:13 PM UTC, comment #3: 

This was reproducable on Fedora Core 4 and 5, we did not observe it on Redhat 8.

The error would occur with:
    find mydir ! -type d
but not with:
    find mydir

The file was on an NFS filesystem and was probably corrupt. `stat` informed us that the mode on the file was 0000. `ls` listed the permissions as "?----------". `fsck` later on picked up the inode as being inconsistant.

Given that find works without the predicate, it seems logical that it should still work with the predicate. It may also make sense to mention a seemingly corrupt file via stderr.

Anonymous
Wed 19 Apr 2006 12:09:24 PM UTC, comment #2: 

What OS are you running?  Exactly what command line did you use?  What type of filesystem is the file on?

I failed to reproduce the problem here because get_statinfo() alwats populates state.type with the contents of struct stat.st_mode which is not zero even for a mode-0 file, because other bits (the bits we are interested in, in fact) are non-zero, at least on the system I am testing on.

I believe that the fix is to remove the assertion, since it is valid I suppose for st_mode to be zero, depending on the value of S_IFREG on your system.


James Youngman <jay>
Group administrator
Wed 19 Apr 2006 04:30:33 AM UTC, comment #1: 

Additionally, your bug tracker has decided that my email address is invalid.

Anonymous
Wed 19 Apr 2006 04:28:36 AM UTC, original submission:  

`find` will abort if it comes across a file with mode 0000 giving an assertion error:
    find: pred.c:1329: pred_type: Assertion `state.type != 0' failed.

It gives no indication of what file it was up to at the time. Ideally it would print a warning to stderr and keep on going, rather than abort. This happens when using the type predicate.

At the very least a more verbose error would be nice.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-05 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.5
    2007-05-05 jay StatusNone Fixed
    2006-04-19 jay Carbon-Copy- Added -email is unavailable-
    2006-04-19 jay PrivacyPrivate Public
    2006-04-19 jay Severity3 - Normal 6 - Security
        PrivacyPublic Private
        Assigned toNone jay

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code