RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 640940 - Buffer overflow in open_tty()
Summary: Buffer overflow in open_tty()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mingetty
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Petr Pisar
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-07 09:47 UTC by Petr Pisar
Modified: 2011-08-18 07:46 UTC (History)
5 users (show)

Fixed In Version: mingetty-1.08-5.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, when invoking mingetty with a TTY name (a non-option position argument) that was longer than 39 ASCII characters, a buffer overflow occurred and the mingetty stack content could have become corrupted. This bug has been fixed in this update so that only the first 39 bytes (34 bytes in case of a relative path) from the TTY name are now copied.
Clone Of: 551754
Environment:
Last Closed: 2011-08-18 07:46:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed fix (595 bytes, patch)
2010-10-26 16:50 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1177 0 normal SHIPPED_LIVE mingetty bug fix update 2011-08-18 07:46:37 UTC

Description Petr Pisar 2010-10-07 09:47:58 UTC
+++ This bug was initially created as a clone of Bug #551754 +++

Description of problem:

Mingetty open_tty() allocates a 40 byte buffer for the name of the tty to open. The tty name passed on the command line is not checked for length.
Version-Release number of selected component (if applicable):

Not sure if this is a security issue as mingetty is not suid. But should still be fixed.

Comment 1 Petr Pisar 2010-10-26 16:50:04 UTC
Created attachment 455811 [details]
Proposed fix

Comment 2 Suzanne Logcher 2011-02-15 21:43:42 UTC
This issue was proposed for RHEL 6.1 FasTrack but did not get resolved in time.
It has been moved to RHEL 6.2 FasTrack.

Comment 7 Petr Pisar 2011-06-07 07:51:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    Invoking mingetty with TTY name (non-option position
    argument) longer than 39 ASCII characters.
    Please note default configuration uses much shorter names
    (e.g. "tty1").
Consequence
    Buffer overflow occurs and mingetty stack content can
    become corrupted.
Fix
    Only first 39 (34 in case of relative path) bytes from
    the TTY name is copied.
Result
    Only secure beginning of TTY name argument is considered
    by mingetty. This is not real issue as TTY names are short
    enough.

Comment 10 Petr Kovar 2011-07-28 10:48:51 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,15 +1 @@
-Cause
+Prior to this update, when invoking mingetty with a TTY name (a non-option position argument) that was longer than 39 ASCII characters, a buffer overflow occurred and the mingetty stack content could have become corrupted. This bug has been fixed in this update so that only the first 39 bytes (34 bytes in case of a relative path) from the TTY name are now copied.-    Invoking mingetty with TTY name (non-option position
-    argument) longer than 39 ASCII characters.
-    Please note default configuration uses much shorter names
-    (e.g. "tty1").
-Consequence
-    Buffer overflow occurs and mingetty stack content can
-    become corrupted.
-Fix
-    Only first 39 (34 in case of relative path) bytes from
-    the TTY name is copied.
-Result
-    Only secure beginning of TTY name argument is considered
-    by mingetty. This is not real issue as TTY names are short
-    enough.

Comment 11 errata-xmlrpc 2011-08-18 07:46:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1177.html


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