The setlogin function in FreeBSD 8.4 through 10.1-RC4 does not initialize the buffer used to store the login name, which allows local users to obtain sensitive information from kernel memory via a call to getlogin, which returns the entire buffer.
https://www.freebsd.org/security/advisories/FreeBSD-SA-14%3A25.setlogin.asc
http://www.debian.org/security/2014/dsa-3070