From owner-freebsd-ports Sat Nov 6 11:40: 4 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 53A2E14CCB for ; Sat, 6 Nov 1999 11:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA68346; Sat, 6 Nov 1999 11:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id C53D914F54; Sat, 6 Nov 1999 11:30:21 -0800 (PST) Message-Id: <19991106193021.C53D914F54@hub.freebsd.org> Date: Sat, 6 Nov 1999 11:30:21 -0800 (PST) From: N/A@FreeBSD.ORG To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: ports/14749: /usr/ports/security/ssh/ has remote buffer-overflow Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14749 >Category: ports >Synopsis: /usr/ports/security/ssh/ has remote buffer-overflow >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 6 11:40:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: N/A >Release: RELENG3 >Organization: N/A >Environment: FreeBSD XXXXXX 3.3-STABLE FreeBSD 3.3-STABLE #6: Thu Sep 30 20:23 :42 PDT 1999 root@XXXXXXX:/usr/src/sys/compile/GARLIC i386 >Description: There appears to be an exploitable buffer-overrun in the SSH 1.2.27 version in ports, with the RSAREF implementation. SSH 1.2.27 is seemingly no longer supported. It goes like that... sshd.c, do_connection at line 1513 gets a long number from the remote side. It proceeds to pass it into rsa_private_decrypt. rsa_private_decrypt (in rsaglue.c) has a ~200 byte buffer which can be overflowed, giving a SIGBUS or SIG 11. It might take some talent to overflow this because of the conversions. >How-To-Repeat: In ssh-1.2.27, modify your sshconnect.c, do_login, change every instance of SSH_SESSION_KEY_LENGTH to SSH_SESSION_KEY_LENGTH+500, and comment out the call to a_public_encrypt (otherwise, you'd crash yourself). A true exploit would probably only encrypt some of the buffer, leaving the rest to cause problems. >Fix: don't use static buffers here, or do a simple bounds check. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message