Re: Password theft from memory?

2011-05-01 Thread C. P. Ghost
On Wed, Apr 27, 2011 at 9:24 PM, Modulok modu...@gmail.com wrote: I know that each process has its own private memory segment, but after a process exits, it nolonger owns that memory. What happens to it? If it's not zeroed out by my process, and it doesn't turn into pixie food, and it's not

Re: Password theft from memory?

2011-04-29 Thread Bob Hall
On Fri, Apr 29, 2011 at 01:54:06AM +0100, RW wrote: On Thu, 28 Apr 2011 13:17:41 -0400 Bob Hall rjh...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:10:10AM +0100, RW wrote: I'm not saying that anonymous mappings used by malloc aren't zero-filled, just that it's not mentioned anywhere in

Re: Password theft from memory?

2011-04-29 Thread RW
On Fri, 29 Apr 2011 12:00:00 -0400 Bob Hall rjh...@gmail.com wrote: On Fri, Apr 29, 2011 at 01:54:06AM +0100, RW wrote: but they aren't the same - that's what the quotes were about. Looking back, I don't see anything in your quotes that raises the issue of anonymous objects being used

Re: Password theft from memory?

2011-04-28 Thread Bob Hall
On Thu, Apr 28, 2011 at 12:10:10AM +0100, RW wrote: I'm not saying that anonymous mappings used by malloc aren't zero-filled, just that it's not mentioned anywhere in the mmap man page. I think it's just taken as read. I just got what you're trying to say. Unfortunately, your quotes mislead me

Re: Password theft from memory?

2011-04-28 Thread RW
On Thu, 28 Apr 2011 13:17:41 -0400 Bob Hall rjh...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:10:10AM +0100, RW wrote: I'm not saying that anonymous mappings used by malloc aren't zero-filled, just that it's not mentioned anywhere in the mmap man page. I think it's just taken as read.

Re: Password theft from memory?

2011-04-27 Thread Bob Hall
On Tue, Apr 26, 2011 at 11:41 AM, RW rwmailli...@googlemail.com wrote: The above quote states that the memory not occupied by the remapped object is zero filled. Which is to say that memory allocated by mmap() is either filled with new data or filled with zeros. In context it says:     If

Re: Password theft from memory?

2011-04-27 Thread Modulok
On Sun, Apr 24, 2011 at 7:10 PM, Modulok modu...@gmail.com wrote: I don't know if this is a problem on FreeBSD... Process A requests memory. Process A Stores a plaintext password in memory or other sensitive data. Process A terminates and the memory is reclaimed by kernel. Process B

Re: Password theft from memory?

2011-04-27 Thread Lowell Gilbert
Modulok modu...@gmail.com writes: On Sun, Apr 24, 2011 at 7:10 PM, Modulok modu...@gmail.com wrote: I don't know if this is a problem on FreeBSD... Process A requests memory. Process A Stores a plaintext password in memory or other sensitive data. Process A terminates and the memory is

Re: Password theft from memory?

2011-04-27 Thread RW
On Wed, 27 Apr 2011 06:14:02 -0400 Bob Hall rjh...@gmail.com wrote: malloc() uses either sbrk or mmap to extend the heap. As far as I know, sbrk extends the heap with zero filled memory. According to the man page, mmap extends it either with remapped data, or with remapped data plus

Re: Password theft from memory?

2011-04-26 Thread RW
On Mon, 25 Apr 2011 22:56:14 -0400 Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 11:29:08PM +0100, RW wrote: On Mon, 25 Apr 2011 13:54:20 -0400 Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 05:46:33PM +0200, C. P. Ghost wrote: On Mon, Apr 25, 2011 at 5:15 PM,

Re: Password theft from memory?

2011-04-26 Thread Bruce Cran
On Mon, 25 Apr 2011 23:29:08 +0100 RW rwmailli...@googlemail.com wrote: The reason I thought that heap memory isn't zeroed is from the discussion of pre-zeroed pages in this article: There's an idlezero task that runs by default (via the vm.idlezero_enable sysctl), zeroing unused pages, but

Re: Password theft from memory?

2011-04-26 Thread RW
On Tue, 26 Apr 2011 10:48:53 +0100 Bruce Cran br...@cran.org.uk wrote: On Mon, 25 Apr 2011 23:29:08 +0100 RW rwmailli...@googlemail.com wrote: The reason I thought that heap memory isn't zeroed is from the discussion of pre-zeroed pages in this article: There's an idlezero task that

Re: Password theft from memory?

2011-04-26 Thread C. P. Ghost
On Tue, Apr 26, 2011 at 11:41 AM, RW rwmailli...@googlemail.com wrote: The above quote states that the memory not occupied by the remapped object is zero filled. Which is to say that memory allocated by mmap() is either filled with new data or filled with zeros. In context it says:     If

Re: Password theft from memory?

2011-04-26 Thread RW
On Tue, 26 Apr 2011 16:23:11 +0200 C. P. Ghost cpgh...@cordula.ws wrote: On Tue, Apr 26, 2011 at 11:41 AM, RW rwmailli...@googlemail.com wrote: The above quote states that the memory not occupied by the remapped object is zero filled. Which is to say that memory allocated by mmap() is

Re: Password theft from memory?

2011-04-25 Thread RW
On Sun, 24 Apr 2011 19:53:41 +0200 C. P. Ghost cpgh...@cordula.ws wrote: On Sun, Apr 24, 2011 at 7:10 PM, Modulok modu...@gmail.com wrote: I don't know if this is a problem on FreeBSD... Process A requests memory. Process A Stores a plaintext password in memory or other sensitive data.

Re: Password theft from memory?

2011-04-25 Thread Bob Hall
On Mon, Apr 25, 2011 at 03:18:46PM +0100, RW wrote: I don't believe the heap is allocated zeroed pages. The kernel does allocate such pages to the BSS segment, but that's because it holds zeroed data such as C static variables. According to McKusick and Neville-Neil's book on FreeBSD, sbrk

Re: Password theft from memory?

2011-04-25 Thread C. P. Ghost
On Mon, Apr 25, 2011 at 5:15 PM, Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 03:18:46PM +0100, RW wrote: I don't believe the heap is allocated zeroed pages.  The kernel does allocate such pages to the BSS segment, but that's because it holds zeroed data such as C static variables.

Re: Password theft from memory?

2011-04-25 Thread Bob Hall
On Mon, Apr 25, 2011 at 05:46:33PM +0200, C. P. Ghost wrote: On Mon, Apr 25, 2011 at 5:15 PM, Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 03:18:46PM +0100, RW wrote: I don't believe the heap is allocated zeroed pages.  The kernel does allocate such pages to the BSS segment, but

Re: Password theft from memory?

2011-04-25 Thread RW
On Mon, 25 Apr 2011 13:54:20 -0400 Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 05:46:33PM +0200, C. P. Ghost wrote: On Mon, Apr 25, 2011 at 5:15 PM, Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 03:18:46PM +0100, RW wrote: I don't believe the heap is allocated

Re: Password theft from memory?

2011-04-25 Thread Bob Hall
On Mon, Apr 25, 2011 at 11:29:08PM +0100, RW wrote: On Mon, 25 Apr 2011 13:54:20 -0400 Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 05:46:33PM +0200, C. P. Ghost wrote: On Mon, Apr 25, 2011 at 5:15 PM, Bob Hall rjh...@gmail.com wrote: On Mon, Apr 25, 2011 at 03:18:46PM

Password theft from memory?

2011-04-24 Thread Modulok
I don't know if this is a problem on FreeBSD... Process A requests memory. Process A Stores a plaintext password in memory or other sensitive data. Process A terminates and the memory is reclaimed by kernel. Process B requests a *huge* chunk of memory. Process B crawls the uninitialized memory,

Re: Password theft from memory?

2011-04-24 Thread C. P. Ghost
On Sun, Apr 24, 2011 at 7:10 PM, Modulok modu...@gmail.com wrote: I don't know if this is a problem on FreeBSD... Process A requests memory. Process A Stores a plaintext password in memory or other sensitive data. Process A terminates and the memory is reclaimed by kernel. Process B