Bug 598154 - (CVE-2010-1646) CVE-2010-1646 sudo: insufficient environment sanitization issue
CVE-2010-1646 sudo: insufficient environment sanitization issue
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,source=vendor-sec,rep...
: Security
Depends On: 598381 598382 598383
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-31 11:19 EDT by Tomas Hoger
Modified: 2015-07-31 02:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-11 14:25:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Hoger 2010-05-31 11:19:22 EDT
Anders Kaseorg and Evan Broder reported a flaw in the way sudo handled duplicated environment variables.  When sudo set certain environment variables (such as PATH set to secure_path value, or special sudo environment variables SUDO_*), the value overwrote first value from user's environment (if it had been preserved and had not removed previously due to env_reset / env_keep / env_delete settings), but left following environment variables with the same name unchanged.

This problem can be used to override secure_path setting from /etc/sudoers file for shell scripts executed using sudo, as bash uses last PATH environment variable value.  In configurations where secure_path is used to enforce sane PATH setting for shell scripts, this can allow users with the privileges to run some script using sudo to run arbitrary command with the privileges of the target user.

Upstream fixes to handle duplicated environment variables:
  http://www.sudo.ws/repos/sudo/rev/3057fde43cf0
  http://www.sudo.ws/repos/sudo/rev/a09c6812eaec

This issue affects sudo packages shipped in Red Hat Enterprise Linux 5, however not the default configuration.  In default configuration, no secure_path is set.  env_reset is used by default, and PATH is not preserved during the environment reset (unlike the upstream sudo default).

The sudo packages in Red Hat Enterprise Linux 3 and 4 do not allow setting secure_path in the /etc/sudoers, there is no compile-time default for the secure_path either.  Whether the user PATH setting is preserved depends on env_reset / env_delete configuration.

Current Fedora configuration specifies secure_path, but also removes PATH from the environment by default.
Comment 3 Tomas Hoger 2010-06-01 08:58:49 EDT
Acknowledgements:

Red Hat would like to thank Anders Kaseorg and Evan Broder of Ksplice, Inc. for responsibly reporting this issue.
Comment 5 Fedora Update System 2010-06-02 05:29:47 EDT
sudo-1.7.2p6-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/sudo-1.7.2p6-2.fc13
Comment 6 Fedora Update System 2010-06-02 05:31:23 EDT
sudo-1.7.2p6-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/sudo-1.7.2p6-2.fc12
Comment 7 Fedora Update System 2010-06-02 05:32:02 EDT
sudo-1.7.2p6-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/sudo-1.7.2p6-2.fc11
Comment 8 Tomas Hoger 2010-06-02 16:23:36 EDT
Upstream advisory:
  http://www.sudo.ws/sudo/alerts/secure_path.html

Fixed upstream in 1.6.9p23 and 1.7.2p7.
Comment 9 Fedora Update System 2010-06-14 13:29:11 EDT
sudo-1.7.2p6-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 errata-xmlrpc 2010-06-15 20:04:06 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0475 https://rhn.redhat.com/errata/RHSA-2010-0475.html
Comment 11 Fedora Update System 2010-06-21 08:57:18 EDT
sudo-1.7.2p6-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2010-06-21 08:59:36 EDT
sudo-1.7.2p6-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.