From owner-freebsd-security@FreeBSD.ORG Mon Apr 21 02:19:07 2014 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A34088D1 for ; Mon, 21 Apr 2014 02:19:07 +0000 (UTC) Received: from pacha.mail.dyslexicfish.net (space.mail.dyslexicfish.net [91.109.5.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3104D1D0A for ; Mon, 21 Apr 2014 02:19:06 +0000 (UTC) Received: from catnip.dyslexicfish.net (space.mail.dyslexicfish.net [91.109.5.35]) by pacha.mail.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id s3L2J4X9020039; Mon, 21 Apr 2014 03:19:04 +0100 (BST) (envelope-from jamie@catnip.dyslexicfish.net) Received: (from jamie@localhost) by catnip.dyslexicfish.net (8.14.5/8.14.5/Submit) id s3L2J4r3020038; Mon, 21 Apr 2014 03:19:04 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <201404210219.s3L2J4r3020038@catnip.dyslexicfish.net> Date: Mon, 21 Apr 2014 03:19:04 +0100 To: rwmaillists@googlemail.com, freebsd-security@freebsd.org Subject: Re: De Raadt + FBSD + OpenSSH + hole? References: <534B11F0.9040400@paladin.bulgarpress.com> <201404141207.s3EC7IvT085450@chronos.org.uk> <201404141232.s3ECWFQ1081178@catnip.dyslexicfish.net> <53522186.9030207@FreeBSD.org> <201404200548.s3K5mV7N055244@catnip.dyslexicfish.net> <53540307.1070708@quietfountain.com> <201404201831.s3KIVCSY054778@catnip.dyslexicfish.net> <20140420220037.076be9d0@gumby.homeunix.com> In-Reply-To: <20140420220037.076be9d0@gumby.homeunix.com> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (pacha.mail.dyslexicfish.net [91.109.5.35]); Mon, 21 Apr 2014 03:19:05 +0100 (BST) X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 02:19:07 -0000 RW wrote: > It can return the physical memory, but there are a couple of caveats. > Firstly, it can only return whole pages. Secondly, it's not returned > instantaneously to avoid the overhead of page-faults and zeroing pages > if that region is remalloced. It's left to the page-daemon to recover > the physical memory in its own time, and it remains readable by it's > previous process until it's reassigned. Again, thanks for clearing that up for me. I wasn't all that far off-base after all, but yours and Nathans replies make sense! So there is a real world use for calloc after all! (though only as a bug catching security measure - no sane program should ever read its memory it hasn't yet written to!) cheers, jamie