Original issue date: December 20, 1990<BR>
Last revised: September 17, 1997<BR>
Attached copyright statement

<P>A complete revision history is at the end of this file.

<P>The following information was sent to us from Sun Microsystems.  It
contains availability information regarding a fix for a vulnerability
in SunOS 4.1 and SunOS 4.1.1.  (A version for SunOS 4.0.3 is currently
in testing and should be available shortly.)  For more information,
please contact Sun Microsystems at 1-800-USA-4SUN.

<P>
<HR>
<H2>Sun Microsystems Security Bulletin</H2>

This information is only to be used for the purpose of alerting
customers to problems. Any other use or re-broadcast of this
information without the express written consent of Sun Microsystems
shall be prohibited.

<P>Sun expressly disclaims all liability for any misuse of this information
by any third party.

<P>These patches are available through your local Sun answer centers
worldwide. As well as through anonymous ftp to <A HREF="ftp://ftp.uu.net>ftp.uu.net</A> in the
~ftp/sun-dist directory.

<P>Please refer to the BugID and PatchID when requesting patches from Sun
answer centers.

<P>NO README information will be posted in the patch on UUNET. Please refer
the the information below for patch installation instructions.

<P>
<PRE>
Sun Bug ID   : 1008324
Synopsis     : TIOCCONS redirection of console input/output is a security 
               violation.
Sun Patch ID : for SunOS 4.1, SunOS 4.1_PSR_A 100187-01
Sun Patch ID : for SunOS 4.1.1 100188-01
Available for: Sun3, Sun3x, Sun4 Sun4c
               SunOS 4.1, SunOS 4.1_PSR_A, SunOS 4.1.1
	</PRE>       
Checksum of compressed tarfile on <A HREF="ftp://ftp.uu.net>ftp.uu.net</A>:~ftp/sun-dist
<PRE>
sum of SunOS 4.1 tarfile 100187-01.tar.Z  : 14138   142
sum of SunOS 4.1.1 tarfile 100188-01.tar.Z: 24122   111
</PRE>
<H3>README information follows:</H3>
Patch-ID# 100188-01
<BR>Keywords: TIOCCONS
<BR>Synopsis: SunOS 4.1.1: TIOCCONS redirection of console is a security violation.
<BR>Date: 17/Dec/90

<P>SunOS release: 4.1.1

<P>Unbundled Product:

<P>Unbundled Release:

<P>Topic: 

<P>BugId's fixed with this patch: 1008324

<P>Architectures for which this patch is available: sun3 sun3x sun4 sun4c

<P>Patches which may conflict with this patch:

<P>Obsoleted by: Next major release of SunOS

<P>Problem Description: TIOCCONS can be used to re-direct console output/input
away from "console"

<P>
<H3>Patch contains kernel object modules for:</H3>
<PRE>
/sys/sun?/OBJ/cons.o
/sys/sun?/OBJ/zs_async.o
/sys/sun?/OBJ/mcp_async.o
/sys/sun?/OBJ/mti.o
</PRE>
Where sun? is one of sun4, sun4c, sun3, sun3x, sun4/490-4.1_PSR_A

<P>NOTE: The sun4c does not use mti.o nor mcp_async.o since this architecture
does not have VME slots and therefore cannot use the ALM-2 Asynchronous Line
Multiplexor or Systech MTI-800/1600. So those modules are not needed.

<P>The fix consists of adding permission checking to setcons, the routine
that does the work of console redirection, and changing its callers to
supply additional information required for the check and to see whether
or not the check succeeded.  Setcons now uses uid and gid information
supplied to it as new arguments to perform a VOP_ACCESS call for VREAD
permission on the console.  If the caller doesn't have permission to
read from the console, setcons rejects the redirection attempt.

<P>
<H2>Install</H2>

<H4>As Root:</H4>
save aside the object modules from the FCS tapes as a precaution:
<PRE>
# mv /sys/sun?/OBJ/cons.o /sys/sun?/OBJ/cons.o.orig
# mv /sys/sun?/OBJ/tty_pty.o /sys/sun?/OBJ/tty_pty.o.orig
# mv /sys/sun?/OBJ/zs_async.o /sys/sun?/OBJ/zs_async.o.orig
# mv /sys/sun?/OBJ/mcp_async.o /sys/sun?/OBJ/mcp_async.o.orig
# mv /sys/sun?/OBJ/mti.o /sys/sun?/OBJ/mti.o.orig
</PRE>
copy the new ".o" files to the OBJ directory:
<PRE>
# cp sun?/*.o /sys/sun?/OBJ/
</PRE>
build and install a new kernel:
<PRE>
rerun /etc/config <kernel-name> and do a "make" for the new kernel</PRE>
Please refer to the System and Network Administration Manual for details
on how to configure and install a custom kernel.

<P>Patch-ID#  100187-01
<BR>Keywords: TIOCCONS
<BR>Synopsis: SunOS 4.1 4.1_PSR_A: TIOCCONS redirection of console is a security violation.
<BR>Date: 17/Dec/90

<P>SunOS release: 4.1 4.1_PSR_A

<P>Unbundled Product:

<P>Unbundled Release:

<P>Topic: 

<P>BugId's fixed with this patch: 1008324

<P>Architectures for which this patch is available: sun3 sun3x sun4 sun4c
sun4-490_4.1_PSR_A 

<P>Patches which may conflict with this patch:

<P>Obsoleted by: Next major release of SunOS

<P>
<H2>Problem Description</H2>
 TIOCCONS can be used to re-direct console output/input
away from "console"


<P>Patch contains kernel object modules for:
<PRE>
/sys/sun?/OBJ/cons.o
/sys/sun?/OBJ/zs_async.o
/sys/sun?/OBJ/mcp_async.o
/sys/sun?/OBJ/mti.o
</PRE>
Where sun? is one of sun4, sun4c, sun3, sun3x, sun4/490-4.1_PSR_ABR

<P>NOTE: The sun4c does not use mti.o nor mcp_async.o since this architecture
does not have VME slots and therefore cannot use the ALM-2 Asynchronous Line
Multiplexed or Systech MTI-800/1600. So those modules are not needed.

<P>The fix consists of adding permission checking to setcons, the routine
that does the work of console redirection, and changing its callers to
supply additional information required for the check and to see whether
or not the check succeeded.  Setcons now uses uid and gid information
supplied to it as new arguments to perform a VOP_ACCESS call for VREAD
permission on the console.  If the caller doesn't have permission to
read from the console, setcons rejects the redirection attempt.



<H2>Install</H2>

<H4>As Root:</H4>

Save aside the object modules from the FCS tapes as a precaution:

<PRE>
# mv /sys/sun?/OBJ/cons.o /sys/sun?/OBJ/cons.o.orig
# mv /sys/sun?/OBJ/tty_pty.o /sys/sun?/OBJ/tty_pty.o.orig
# mv /sys/sun?/OBJ/zs_async.o /sys/sun?/OBJ/zs_async.o.orig
# mv /sys/sun?/OBJ/mcp_async.o /sys/sun?/OBJ/mcp_async.o.orig
# mv /sys/sun?/OBJ/mti.o /sys/sun?/OBJ/mti.o.orig
</PRE>
copy the new ".o" files to the OBJ directory:
<PRE>
# cp sun?/*.o /sys/sun?/OBJ/
</PRE>

Build and install a new kernel:
rerun /etc/config <kernel-name> and do a "make" for the new kernel

<P>Please refer to the System and Network Administration Manual for details
on how to configure and install a custom kernel.

<P><HR>

<!--#include virtual="/include/footer_nocopyright.html" -->
<P>Copyright 1990 Carnegie Mellon University.</P>

<HR>

Revision History
<PRE>
September 17, 1997  Attacced copyright statement
</PRE>