SUSE Support

Here When You Need Us

Security vulnerability: tty injection via sudo

This document (000021241) is provided subject to the disclaimer at the end of this document.

Environment

Any SUSE Linux Enterprise based product running a sudo version lower than 1.9.14p1.

Situation

The Linux TTY subsystem allows pushing back keypresses into the TTY stack, which is a not well known feature and can lead to unexpected consequences or potential attacks.

In cases where untrusted code using e.g. "sudo" is executed, the untrusted code could push keypresses into the TTY stack, which could then be executed after the sudo execution finishes.

While commonly sudo is used for transitioning to "root" where this would not be a problem, multiple other sudo scenarios are possible where this could be used to escalate privileges.

The untrusted code would then be able to execute commands as root using this attack.

To avoid this injection, sudo has the option to create a new pseudo terminal device (PTY), which is discarded after running sudo and then would not be affected by this keypress push back attack.

Please note that this might impact terminal output or use of interactive keys like backspace/delete.

Resolution

Add the line

    Default use_pty

to the /etc/sudoers configuration file using the visudo command.
Starting with sudo version 1.9.14p1 this setting is the default for new installations.

Status

Security Alert

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021241
  • Creation Date: 18-Oct-2023
  • Modified Date:19-Oct-2023
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications
    • SUSE Manager Server
    • SUSE Linux Enterprise Micro

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.