[Bug 201750] find crashes in brace substitution on specially crafted directory structure

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 22 02:07:40 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201750

            Bug ID: 201750
           Summary: find crashes in brace substitution on specially
                    crafted directory structure
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: marcus at blazingdot.com

This bug taken from the openbsd-tech mailing list applies to freebsd find,
though the offending function is somewhat different in freebsd.

  http://marc.info/?l=openbsd-tech&m=143688921422969&w=2

After running:

    #include <sys/stat.h>
    #include <string.h>
    #include <unistd.h>
    int main(void) {
        char s[256]; int i;
        memset(s, 'x', sizeof s);
        s[255] = 0;
        for (i = 0; i < 200; i++) {
            mkdir(s, 0777);
            chdir(s);
        }
        return 0;
    }

$ find xxx* -exec true {} \;
Bus error (core dumped)

See their fix in http://marc.info/?l=openbsd-tech&m=143689362824448&w=2

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list