From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 28 11:12:47 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B08010656D1 for ; Mon, 28 Jul 2008 11:12:47 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by mx1.freebsd.org (Postfix) with ESMTP id B12378FC12 for ; Mon, 28 Jul 2008 11:12:46 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so4445549fkk.11 for ; Mon, 28 Jul 2008 04:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:cc:subject :in-reply-to:message-id:references:user-agent:mime-version :content-type:from; bh=ZpmC9qaqCsZKj6NwR2Nys1UL6iEM+cAD5uDtQanojrc=; b=wwIvd15cowAMNyz8+CVmLvXe2AdnkdVsHpRXssJGege+3jlFH76zKbHDVpMuG4swK2 Wc1KX0U8nUe02GwciXd9v4SVEClzqNqccAniSMyYQqZNTlV1VWMz7O6Ev6AR++YEgUA6 ZZip1XYGnUjppX5DD8WJIF8BT5sD0RJ75MSCM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:cc:subject:in-reply-to:message-id:references:user-agent :mime-version:content-type:from; b=xuc+Zuk7PZFUUISDR7JWmXE8nKoiQ0H4vSBUCqKGbTVWrFaeM+5gAQzG6rnUuBNplp 0sQmGIB4qi9Akp/hhu5kUfFL/z0C1fv/UoX47gwyxuDX8CH6y7YgBjl11FzJ5Ty9ctq/ KC9tlrCnTIcEp6FYkQIfRWc4IKaIPATOSQXhI= Received: by 10.181.22.8 with SMTP id z8mr1348958bki.78.1217243565279; Mon, 28 Jul 2008 04:12:45 -0700 (PDT) Received: from ora.chd.net ( [78.107.232.239]) by mx.google.com with ESMTPS id 13sm23663406fks.6.2008.07.28.04.12.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jul 2008 04:12:44 -0700 (PDT) Date: Mon, 28 Jul 2008 15:12:31 +0400 (MSD) To: Chagin Dmitry In-Reply-To: Message-ID: References: <200807250700.m6P70FSF036132@freefall.freebsd.org> <20080726091045.4c617dc7@deskjail> <20080728085403.58063b2gbchdjtic@webmail.leidinger.net> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed From: Chagin Dmitry Cc: Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: kern/117010: [linux] linux_getdents() get somethinng like buffer overflow X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2008 11:12:47 -0000 On Mon, 28 Jul 2008, Chagin Dmitry wrote: > > agree, we should do check before calculating linuxreclen, like: > > if (bdp->d_namlen > LINUX_NAME_MAX) { > error = ENAMETOOLONG; > goto out; > } > d_namlen declared as uint8_t, so comparison is always false. lets's leave it will not changed FreeBSD d_namlen type? -- Have fun! chd