From: ruby rub Date: 2012-03-24T10:56:35+09:00 Subject: Re: Write to kernel buffer? Eric Wong wrote in post #1053030: > ruby rub wrote: >> It takes the password as input from the user, holds it in memory for >> some period of time, and then overwrites it. It also doesn't >> echo when the password is typed in. This is great but I also want to >> make sure the password is overwritten in the kernel buffer. Does anyone >> have any suggestions? Really I would just like to be pointed in the >> right direction :). > > I don't think there's a good way to force this from userspace (in any > programming language). > > Kernels will zero any memory it gives to userspace (via brk(2)/mmap(2)), > but kernels will internally reuse buffers any way it sees fit. Even if > you could clear the kernel memory right away (via custom kernel > module/syscall), you can't guarantee hardware buffers > (keyboard/network/console/video card/etc...) are cleared. It isn't possible to clear keyboard buffers? Wow this + lack of ability to clear kernel buffers makes secure wipes of password from memory impossible, how unfortunate. Are there bad ways to try to force it from userspace? -- Posted via http://www.ruby-forum.com/.