Debian Security Advisory
DSA-946-2 sudo -- missing input sanitising
- Date Reported:
- 20 Jan 2006
- Affected Packages:
- sudo
- Vulnerable:
- Yes
- Security database references:
- In the Debian bugtracking system: Bug 342948.
In the Bugtraq database (at SecurityFocus): BugTraq ID 16184.
In Mitre's CVE dictionary: CVE-2005-4158, CVE-2006-0151. - More information:
-
The former correction to vulnerabilities in the sudo package worked fine but were too strict for some environments. Therefore we have reviewed the changes again and allowed some environment variables to go back into the privileged execution environment. Hence, this update.
The configuration option "env_reset" is now activated by default. It will preserve only the environment variables HOME, LOGNAME, PATH, SHELL, TERM, DISPLAY, XAUTHORITY, XAUTHORIZATION, LANG, LANGUAGE, LC_*, and USER in addition to the separate SUDO_* variables.
For completeness please find below the original advisory text:
It has been discovered that sudo, a privileged program, that provides limited super user privileges to specific users, passes several environment variables to the program that runs with elevated privileges. In the case of include paths (e.g. for Perl, Python, Ruby or other scripting languages) this can cause arbitrary code to be executed as privileged user if the attacker points to a manipulated version of a system library.
This update alters the former behaviour of sudo and limits the number of supported environment variables to LC_*, LANG, LANGUAGE and TERM. Additional variables are only passed through when set as env_check in /etc/sudoers, which might be required for some scripts to continue to work.
For the old stable distribution (woody) this problem has been fixed in version 1.6.6-1.6.
For the stable distribution (sarge) this problem has been fixed in version 1.6.8p7-1.4.
For the unstable distribution (sid) the same behaviour will be implemented soon.
We recommend that you upgrade your sudo package. For unstable "Defaults = env_reset" need to be added to /etc/sudoers manually.
- Fixed in:
-
Debian GNU/Linux 3.0 (woody)
- Source:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6.dsc
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6.diff.gz
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6.orig.tar.gz
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6.diff.gz
- Alpha:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_alpha.deb
- ARM:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_arm.deb
- Intel IA-32:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_i386.deb
- Intel IA-64:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_ia64.deb
- HPPA:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_hppa.deb
- Motorola 680x0:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_m68k.deb
- Big endian MIPS:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_mips.deb
- Little endian MIPS:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_mipsel.deb
- PowerPC:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_powerpc.deb
- IBM S/390:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_s390.deb
- Sun Sparc:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.6-1.6_sparc.deb
Debian GNU/Linux 3.1 (sarge)
- Source:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4.dsc
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4.diff.gz
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7.orig.tar.gz
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4.diff.gz
- Alpha:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_alpha.deb
- AMD64:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_amd64.deb
- ARM:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_arm.deb
- Intel IA-32:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_i386.deb
- Intel IA-64:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_ia64.deb
- HPPA:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_hppa.deb
- Motorola 680x0:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_m68k.deb
- Big endian MIPS:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_mips.deb
- Little endian MIPS:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_mipsel.deb
- PowerPC:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_powerpc.deb
- IBM S/390:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_s390.deb
- Sun Sparc:
- http://security.debian.org/pool/updates/main/s/sudo/sudo_1.6.8p7-1.4_sparc.deb
MD5 checksums of the listed files are available in the original advisory.
MD5 checksums of the listed files are available in the revised advisory.