Return-path: Envelope-to: ******@*******.*** Delivery-date: Mon, 02 May 2005 16:33:11 -0400 Received: from [205.206.231.27] (helo=outgoing.securityfocus.com) by ******************** with esmtp (Exim 4.43) id 1DShbE-0001Yk-Fe for ******@*******.***; Mon, 02 May 2005 16:33:11 -0400 Received: from outgoing.securityfocus.com by outgoing.securityfocus.com via smtpd (for [209.51.158.170] [209.51.158.170]) with ESMTP; Mon, 2 May 2005 13:33:02 -0700 Received: from lists2.securityfocus.com (lists2.securityfocus.com [205.206.231.20]) by outgoing3.securityfocus.com (Postfix) with QMQP id 2A6FD237471; Mon, 2 May 2005 13:48:48 -0600 (MDT) Mailing-List: contact bugtraq-help@securityfocus.com; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list bugtraq@securityfocus.com Delivered-To: moderator for bugtraq@securityfocus.com Received: (qmail 18967 invoked from network); 1 May 2005 01:45:31 -0000 X-UWA-Client-IP: 130.95.13.9 (UWA) Date: Sun, 1 May 2005 17:14:35 +0800 From: Matt Johnston To: bugtraq@securityfocus.com Subject: Insecure pty permissions in OS X < 10.4 Message-ID: <20050501091435.GA20036@ucc.gu.uwa.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-SpamTest-Info: Profile: Formal (236/050427) X-SpamTest-Info: Profile: Detect Hard [UCS 290904] X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking Spam - Subject (UCS) [02-08-04] X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release Hi all. Mac OS X 10.3.x and earlier doesn't provide any mechanism for non-setuid-root programs to change permissions on ptys. Hence xterms, screen sessions, and Terminal.app windows (with explicitly specified commands) are vulnerable to tty sniffing. Note that using Terminal.app's standard terminal with /usr/bin/login is safe since login is setuid root. An example: arctic:~> screen ... new screen session starts ... arctic:~> ls -l $TTY crw-rw-rw- 1 root wheel 4, 2 1 May 16:44 /dev/ttyp2 This problem is fixed in 10.4, the devfs appears to be setting permissions on openpty() or something (I haven't looked at the mechanism yet). Apple were notified of the problem on 20 July 2004. It's good to see that 10.4 has optional encrypted swap, resolving the separate issue of passwords being swapped to disk (fixing it for 3rd party apps as well). Matt