Bug 1010154

Summary: libedit does not restore original term attributes on exit
Product: Red Hat Enterprise Linux 6 Reporter: wzis
Component: libeditAssignee: Boris Ranto <branto>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: isenfeld, jh.redhat-2018
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: bug in libedit Consequence: Fix: Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 11:44:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
[PATCH] libedit: restore original term attributes on exit none

Description wzis 2013-09-20 05:53:36 UTC
Description of problem: libedit has a bug which causes RHEL 6.1-6.4 sftp not handling tty attributes setting properly.


Version-Release number of selected component (if applicable): 2.11


How reproducible:
Easy to reproduce.

Steps to Reproduce:
1. stty -echo
2. sftp user@server
3. enter pass as required.
4. cd /tmp
5. ls
6. bye
7. stty -a

Actual results:
the sftp sub-commands entered in step 4-6 are visible, the os command entered after sftp command on step 7 also visible.


Expected results:
The step 4-7 shouldn't be visible

Additional info:
This is for security.

Comment 2 wzis 2013-09-20 22:28:37 UTC
When openssh 5.3p1 is complied without using the "--with-libedit", the result is working fine. So, the issue is caused by making the package with "--with-libedit" and the libedit has some issue in handling the tty attributes.

Comment 3 Kamil Dudka 2013-09-23 11:31:42 UTC
Created attachment 801581 [details]
[PATCH] libedit: restore original term attributes on exit

Restoring of the original terminal attributes on exit was implemented upstream later on.  The attached patch implements it for RHEL-6.  Otherwise the described behavior does not differ from upstream, neither has been confirmed as a bug yet.

Comment 5 RHEL Program Management 2013-10-13 23:09:10 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 6 Petr Lautrbach 2015-02-11 08:57:27 UTC
*** Bug 1008042 has been marked as a duplicate of this bug. ***

Comment 7 wzis 2015-02-11 22:56:23 UTC
Just restore tty setting at exit is not good enough: the sftp needs to allow user to control tty echo setting, so if a user has turned off echo for the tty, the sftp should not turn it back on, because that's what the user wants, and if the user wants to see the input, he/she could do it by turning echo on before exec sftp, but if the sftp will always turn on echo, then the user will have no way to control the behavior, that's not right and not good for security if the user wants to hide the activities.

Comment 8 Jan Kurik 2017-12-06 11:44:51 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/