passwd command in shadow in Ubuntu 5.04 through 6.06 LTS, when called with the -f, -g, or -s flag, does not check the return code of a setuid call, which might allow local users to gain root privileges if setuid fails in cases such as PAM failures or resource limits.
http://www.ubuntu.com/usn/usn-308-1
http://www.securityfocus.com/bid/18850
http://www.debian.org/security/2006/dsa-1150
http://secunia.com/advisories/21480