BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000335 [uClibc] Architecture Specific minor always 07-11-05 10:13 10-08-08 04:21
Reporter wmq View Status public  
Assigned To uClibc
Priority normal Resolution open  
Status feedback   Product Version
Summary 0000335: potential null pointer access in glob_pattern_p() and extra byte in "/"
Description 1. glob_pattern_p():
 potential null pointer access when P++ which caused ftp server terminates the ftp client.
2. when list "/" in ftp, due to prefix_array() doesn't set the "/?" to "/", the ftp client will be terminated because the root directory doesn't exist.
Additional Information The attachment is the fix.
since this file is not large, I attached the whole file to overwrite glob.c.
Attached Files  glob.c.mod [^] (13,270 bytes) 07-11-05 10:13

- Relationships

- Notes
(0000279)
vapier
07-11-05 18:43

yeah, glibc had this in their updated glob.c:
        case '\\':
        if (quote && p[1] != '\0')
            ++p;
        break;

so i've committed this
 
(0000280)
vapier
07-11-05 20:11

glibc uses this:
      qsort ((__ptr_t) &pglob->gl_pathv[oldcount],
         pglob->gl_pathc + pglob->gl_offs - oldcount,

but you use this:
    qsort ((__ptr_t) &pglob->gl_pathv[oldcount + pglob->gl_offs],
      pglob->gl_pathc - oldcount - pglob->gl_offs,
 
(0000282)
wmq
07-12-05 10:28

I changed the qsort call long time ago, so I don't remember clearly. try using "ls *" in ftp client and see the difference.
 
(0013084)
bernhardf
10-08-08 04:21

Does trunk work now like expected? Do you have a testcase that we could put into the testsuite that exposed this bug?
 

- Issue History
Date Modified Username Field Change
07-11-05 10:13 wmq New Issue
07-11-05 10:13 wmq File Added: glob.c.mod
07-11-05 18:43 vapier Note Added: 0000279
07-11-05 20:11 vapier Note Added: 0000280
07-12-05 10:28 wmq Note Added: 0000282
10-08-08 04:21 bernhardf Note Added: 0013084
10-08-08 04:21 bernhardf Status assigned => feedback


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker