Date: Sun, 18 Jul 2010 15:10:55 GMT From: Changming Sun <snnn119@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/148733: a potential buffer overflow in bin/sh Message-ID: <201007181510.o6IFAtTZ031809@www.freebsd.org> Resent-Message-ID: <201007181520.o6IFK6Qo071432@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 148733 >Category: bin >Synopsis: a potential buffer overflow in bin/sh >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 18 15:20:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Changming Sun >Release: FreeBSD 9 >Organization: wanmei.inc >Environment: FreeBSD 9 >Description: There is a invoke to "readdir" function in /usr/src/bin/sh/expand.c:expmeta(char *enddir, char *name),then the result of d_name has been copied to "enddir" scopy(dp->d_name, enddir); is enddir enough large to hold this ? expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */ It seems like somebody has already known this problem,but nobody want to fix it! >How-To-Repeat: Get head source from svn,then review it. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007181510.o6IFAtTZ031809>