Bug 1339935 (CVE-2016-7091)

Summary: CVE-2016-7091 sudo: Possible info leak via INPUTRC
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, c.david86, dkopecek, dmcphers, dmoppert, erik-fedora, jan.kratochvil, jaromir.capik, jchaloup, jialiu, jokerman, kzak, lmeyer, lnykryn, mlichvar, mmccomas, rjones, rsroka, sardella, slawomir, tiwillia
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
It was discovered that the default sudo configuration preserved the value of INPUTRC from the user's environment, which could lead to information disclosure. A local user with sudo access to a restricted program that uses readline could use this flaw to read content from specially formatted files with elevated privileges provided by sudo.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:52:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1339936, 1339937, 1339938, 1340696, 1340697, 1340698, 1340699, 1340700, 1340701    
Bug Blocks: 1339940    

Description Adam Mariš 2016-05-26 08:44:34 UTC
It was found that malicious user can leak some information about arbitrary files by providing arbitrary value for INPUTRC, since the target application parses the INPUTRC file with the target user's privileges.

This kind of attack is in current version of readline limited to only timing attacks and leaks of line content matching a very particular format, but the next release will feature enhanced error reporting, making the disclosure more dangerous.  It is also possible to cause segmentation fault through stack exhaustion in the target application by having INPUTRC specify a file with an $include directive for itself.

RHEL and Fedora by default include INPUTRC in /etc/sudoers, exposing this issue to users of the default sudo configuration.  INPUTRC should not be included in "env_keep" at all, or else somehow restricted to non-restricted shells (ie /bin/sh, /bin/bash).

Upstream bug:

https://lists.gnu.org/archive/html/bug-readline/2016-05/msg00009.html

Comment 1 Adam Mariš 2016-05-26 08:45:13 UTC
Created readline tracking bugs for this issue:

Affects: fedora-all [bug 1339936]

Comment 2 Adam Mariš 2016-05-26 08:45:23 UTC
Created mingw-readline tracking bugs for this issue:

Affects: fedora-all [bug 1339938]

Comment 3 Adam Mariš 2016-05-26 08:45:33 UTC
Created compat-readline5 tracking bugs for this issue:

Affects: fedora-all [bug 1339937]

Comment 6 Doran Moppert 2016-05-30 06:20:20 UTC
Created sudo tracking bugs for this issue:

Affects: fedora-all [bug 1340701]

Comment 11 Fedora Update System 2016-06-05 02:55:11 UTC
sudo-1.8.15-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Doran Moppert 2016-06-15 01:42:04 UTC
Acknowledgements:

Name: Grisha Levit

Comment 14 Fedora Update System 2016-06-18 04:19:27 UTC
sudo-1.8.15-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-06-18 18:51:46 UTC
sudo-1.8.16-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Doran Moppert 2016-08-26 00:21:26 UTC
CVE Assignment:

http://seclists.org/oss-sec/2016/q3/376

Comment 18 errata-xmlrpc 2016-11-03 20:32:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:2593 https://rhn.redhat.com/errata/RHSA-2016-2593.html