From owner-freebsd-hackers Thu Aug 22 19:18:24 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96B2237B400 for ; Thu, 22 Aug 2002 19:18:22 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1AA143E65 for ; Thu, 22 Aug 2002 19:18:21 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.11.1/8.11.1) id g7N2ILf18812 for freebsd-hackers@FreeBSD.ORG; Thu, 22 Aug 2002 22:18:21 -0400 (EDT) (envelope-from bicknell) Date: Thu, 22 Aug 2002 22:18:21 -0400 From: Leo Bicknell To: freebsd-hackers@FreeBSD.ORG Subject: Re: userland malloc() and zeroed page allocation in Kernel Message-ID: <20020823021821.GA18704@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: <001601c24a4a$121fbb60$1bf2fe81@etri.re.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001601c24a4a$121fbb60$1bf2fe81@etri.re.kr> Organization: United Federation of Planets Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In a message written on Fri, Aug 23, 2002 at 11:09:07AM +0900, Un, SungKyong wrote: > It seems that Kernel zero-out all free pages before allocation. > I know the Kernel allocate pre-zeroed page for BSS area but not for heap > area. The kernel should zero all pages handed to a userspace application. The reason is security. It would be really bad if one user ran, say, passwd, and then the next user could malloc a large block of memory, sort through it, and find the plain text password. -- Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message