-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2009.1022
                                  OpenSSH
                                6 July 2009

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           OpenSSH
Publisher:         NetBSD
Operating System:  NetBSD
Impact/Access:     Access Privileged Data -- Remote/Unauthenticated
Resolution:        Upgrade
CVE Names:         CVE-2008-5161  

Reference:         ESB-2008.1076

Original Bulletin: 
   http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2009-005.txt.asc

- --------------------------BEGIN INCLUDED TEXT--------------------

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

		 NetBSD Security Advisory 2009-005
		 =================================

Topic:		Plaintext Recovery Attack Against SSH

Version:	NetBSD-current:	source prior to June 8, 2009
		NetBSD 5.0:	source prior to June 30, 2009
		NetBSD 4.0.1:	source prior to June 30, 2009
		NetBSD 4.0:	source prior to June 30, 2009
		pkgsrc:		openssh packages prior to 5.2

Severity:	Information leakage from SSH sessions

Fixed:		NetBSD-current:    June 8, 2009
		NetBSD-5 branch:   June 30, 2009 (5.0.1 will include the fix)
		NetBSD-4 branch:   June 30, 2009 (4.1 will include the fix)
		NetBSD-4-0 branch: June 30, 2009 (4.0.2 will include the fix)
		pkgsrc 2009Q1:	   openssh-5.2 corrects this issue

Please note that NetBSD releases prior to 4.0 are no longer supported.
It is recommended that all users upgrade to a supported release.


Abstract
========

A defect exists in SSH protocol that allows active attackers to
recover plaintext from an SSH session if a CBC mode cipher is in
use. Updated versions of OpenSSH mitigate this problem.

http://secunia.com/advisories/32760/
http://www.cpni.gov.uk/Docs/Vulnerability_Advisory_SSH.txt
http://www.kb.cert.org/vuls/id/958563


Technical Details
=================

The CBC cipher mode of the SSH protocol allows a remote attacker
to recover up to 32 bits of plaintext data from an existing SSH
session by sending specially crafted packets. This can be mitigated
either through changes of the sshd_config and ssh_config files or
by updating to the latest version of OpenSSH.

http://secunia.com/advisories/32760/
http://www.cpni.gov.uk/Docs/Vulnerability_Advisory_SSH.txt
http://www.kb.cert.org/vuls/id/958563


Solutions and Workarounds
=========================


The problem can be mitigated by disabling the CBC mode ciphers
using the following directive in sshd_config and ssh_config:

    Ciphers aes128-ctr,aes256-ctr,arcfour256,arcfour,aes128-cbc,aes256-cbc

This makes the CBC ciphers most unlikely to be selected, reducing
the likelyhood of exposure.

In order to fix the underlying problem, users should upgrade their
SSH clients and servers. The information leak vulnerability requires
an active attack and is not easy to exploit, but is potentially
dangerous.

The following instructions describe how to upgrade your SSH
binaries by updating your source tree and rebuilding and
installing a new version of SSH.

* NetBSD-current:

	Systems running NetBSD-current dated from before 2009-06-08
	should be upgraded to NetBSD-current dated 2009-06-09 or later.

	The following directories need to be updated from the
	netbsd-current CVS branch (aka HEAD):
		crypto/external/bsd/openssh/dist

	To update from CVS, re-build, and re-install SSH:
		# cd src
		# cvs update -d -P crypto/external/bsd/openssh/dist
		# cd usr.bin/ssh

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


* NetBSD 5.0:

	The binary distribution of NetBSD 5.0 is vulnerable.

	Systems running NetBSD 5.0 sources dated from before
	2009-06-29 23:00 UTC should be upgraded from NetBSD 5.0
	sources dated 2009-06-30 or later.

	NetBSD 5.0.1 and 5.1 will include the fix.

	The following directories need to be updated from the
	netbsd-5-0 CVS branch:
		crypto/dist/ssh

	To update from CVS, re-build, and re-install SSH:

		# cd src
		# cvs update -d -P -r netbsd-5-0 crypto/dist/ssh
		# cd usr.bin/ssh

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


	Alternatively, apply the following patch (with potential offset
	differences):
	 ftp://ftp.NetBSD.org/pub/NetBSD/security/patches/SA2009-005-openssh-nb5.patch

	To patch, re-build and re-install SSH:

		# cd src/crypto/dist/ssh
		# patch < /path/to/SA2009-005-openssh-nb5.patch

		# cd ../../../usr.bin/ssh
		# make cleandir dependall
		# make install


* NetBSD 4.0, 4.0.1:

	The binary distributions of NetBSD 4.0 and 4.0.1 are vulnerable.

	Systems running NetBSD 4.0 sources dated from before
	2009-06-30 01:00 UTC should be upgraded from NetBSD 4.0
	sources dated 2009-06-30 or later.

	NetBSD 4.1 and 4.0.2 will include the fix.

	The following directories need to be updated from the
	netbsd-4-0 CVS branch:
		crypto/dist/ssh

	To update from CVS, re-build, and re-install SSH:

		# cd src
		# cvs update -d -P -r netbsd-4-0 crypto/dist/ssh
		# cd usr.bin/ssh

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


	Alternatively, apply the following patch (with potential offset
	differences):
 ftp://ftp.NetBSD.org/pub/NetBSD/security/patches/SA2009-005-openssh-nb4.patch

	To patch, re-build and re-install SSH:

		# cd src/dist/ssh
		# patch < /path/to/SA2009-005-openssh-nb4.patch

		# cd ../../../usr.bin/ssh
		# make cleandir dependall
		# make install


Thanks To
=========

Martin Albrecht, Kenny Paterson and Gaven Watson from the
Information Security Group at Royal Holloway, University of
London for finding and reporting the issue.


Revision History
================

	2009-06-30	Initial release


More Information
================

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at 
 http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-005.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.


Copyright 2009, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2009-005.txt,v 1.1 2009/06/30 00:32:25 tonnerre Exp $

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (NetBSD)

iQIcBAEBAgAGBQJKSl6UAAoJEAZJc6xMSnBuspkQALQuPHnJla8/j0MF5jvPZJoy
7+Y9XbmLOMux/c80lqGINX4aRCj+H9JZ8IWkIU7iTnKri6tn4AurhfE6LI4Mta84
OQ/VFz5t8QCYfuhuBZeAUnW6CLShnwdVBoLBitpAeQEavTHTiyz3BMEQpXFlWsya
VtFsiKF8GnkcQNI3f6/iNCwMSrloiMiTTCaovG0Kt0iITBAl5kO4EKf1y2us/KcI
KpPd7rKR0hdyK1hPt/ZRh0s981rwm+/ZjIzPfjgEj9cSWHn0mCbAqycqrqdEjeOK
i3UW0JtRjE/EFcFKJLOTA86mlU9oTK1J5Z4mk/o/AB/3BVtntRLgv56VLE72aYBc
ZPbEGMIGAmwhKk67u+jwdGtOE+C8Dge3F+GWzLy51fW7kHPmDlKpiKSmg1Qo0SdB
8qwiCwuDWOvqaGeIMaKqgM2wrQxlY+bjz4eiYBrDPH+bazcQfrwXRGRXlEDhWi43
pEd7XbCKz0KJSx16ZxRqXDeVvjtAEGucfDeakMYzAFjq832RlE+jAoJ3z69sDALZ
goRqvSO//VrOaAuIaUJwE8A4SraJWD3tCzGxk2niZW2ZYwMYoJnaIO0fHbsZ45yN
G5SzqPTUKtjKX5d3swdnNbPVaXi5jUKZtggzfyu286r9gziSUN2yqhEXQYcTzvK1
/ujYOT/k3khhYjG9CbVh
=rKrv
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iD8DBQFKUTPpNVH5XJJInbgRAqYnAJ41WxIByoDO7v2GoLd42KYJmJH+3gCfQaCP
AbbkSSHLagsPfOJKIlCgHns=
=SFqs
-----END PGP SIGNATURE-----