bin/71743: off-by-one error in mkdir

Brian Moore mooreb at silverspringnet.com
Tue Sep 14 12:50:21 PDT 2004


>Number:         71743
>Category:       bin
>Synopsis:       off-by-one error in mkdir
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 14 19:50:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Brian Moore
>Release:        4.9
>Organization:
Silver Spring Networks
>Environment:
FreeBSD blackcomb.silverspringnet.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003     root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
mkdir experiences a uninitialized memory read when building a directory
that does not end in a slash.
>How-To-Repeat:
with purify, pass mkdir a path that does not end in a slash.
you will see a UMR.

>Fix:
the following patch is to src/bin/mkdir/mkdir.c:

<     if ('\0' == p[1]) {
---
>     if (last || ('\0' == p[1])) {

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list