NetBSD 1.6, NetBSD 2.0 through 2.1, and NetBSD-current before 20051031 allows local users to gain privileges by attaching a debugger to a setuid/setgid (P_SUGID) process that performs an exec without a reset of real credentials.
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2005-013.txt.asc
archives.neohapsis.com/archives/fulldisclosure/2005-11/0157.html
mail-index.netbsd.org/source-changes/2005/10/31/0001.html
prdelka.blackart.org.uk/exploitz/prdelka-vs-BSD-ptrace.tar.gz
www.osvdb.org/20759
www.securityfocus.com/bid/15290