CVE-2008-5161: OpenSSH CBC plaintext recovery

Bug #379329 reported by Johannes Hessellund on 2009-05-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Colin Watson
Colin Watson

Bug Description

According to:

openssh prior to version 5.2 has security flaw, allowing man in the middle attacks.

More info:

Please upgrade version to 5.2 and backport to at least Hardy, but preferably also to Dapper !

Related branches

CVE References

visibility: private → public
Armindo Silva (deathon2legs) wrote :

It appears that there's no need to backport a new version of OpenSSH. As you can see here: you only need to add this line:

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

to ssh_config and sshd_config and restart the daemon.
The severity is considered to be potentially HIGH due to the
32 bits of plaintext that can be recovered. However, the
likelihood of a successful attack is considered LOW.

Changed in openssh (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
summary: - Security flaw in openSSH prior to 5.2
+ CVE-2008-5161: OpenSSH CBC plaintext recovery
Colin Watson (cjwatson) on 2010-01-04
Changed in openssh (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (4.4 KiB)

This bug was fixed in the package openssh - 1:5.2p1-1ubuntu1

openssh (1:5.2p1-1ubuntu1) lucid; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Add support for registering ConsoleKit sessions on login.
    - Drop openssh-blacklist and openssh-blacklist-extra to Suggests; they
      take up a lot of CD space, and I suspect that rolling them out in
      security updates has covered most affected systems now.
  * Convert to Upstart. The init script is still here for the benefit of
    people running sshd in chroots. Note that the Upstart job does not
    support /etc/default/ssh, because it's much more straightforward to edit
    the job (/etc/init/ssh.conf) than it was to edit the init script.

openssh (1:5.2p1-1) unstable; urgency=low

  * New upstream release (closes: #536182). Yes, I know 5.3p1 has been out
    for a while, but there's no GSSAPI patch available for it yet.
    - Change the default cipher order to prefer the AES CTR modes and the
      revised "arcfour256" mode to CBC mode ciphers that are susceptible to
      CPNI-957037 "Plaintext Recovery Attack Against SSH".
    - Add countermeasures to mitigate CPNI-957037-style attacks against the
      SSH protocol's use of CBC-mode ciphers. Upon detection of an invalid
      packet length or Message Authentication Code, ssh/sshd will continue
      reading up to the maximum supported packet length rather than
      immediately terminating the connection. This eliminates most of the
      known differences in behaviour that leaked information about the
      plaintext of injected data which formed the basis of this attack
      (closes: #506115, LP: #379329).
    - ForceCommand directive now accepts commandline arguments for the
      internal-sftp server (closes: #524423, LP: #362511).
    - Add AllowAgentForwarding to available Match keywords list (closes:
    - Make ssh(1) send the correct channel number for
      avoid triggering 'Non-public channel' error messages on sshd(8) in
    - Avoid printing 'Non-public channel' warnings in sshd(8), since the
      ssh(1) has sent incorrect channel numbers since ~2004 (this reverts a
      behaviour introduced in openssh-5.1; closes: #496017).
    - Disable nonfunctional ssh(1) ~C escape handler in multiplex slave
      connections (closes: #507541).
    - Fix "whitepsace" typo in ssh_config(5) (closes: #514313, LP: #303835).
  * Update to GSSAPI patch from,
    including cascading credentials support (LP: #416958).
  * Use x11.pc when compiling/linking gnome-ssh-askpass2 (closes: #555951).
  * Moved to; add Vcs-Bzr and Vcs-Browser control fields.
  * Add debian/README.source with instructions on bzr handling.
  * Make ChrootDirectory work with SELinux (thanks, Russell Coker; closes:
  * Initialise sc to NULL in ssh_selinux_getctxbyname (thanks, Václav Ovsík;
    closes: #498684).
  * Don't duplicate backslashes when displaying server banner (thanks,
    Michał Górny; closes: #505378, LP...


Changed in openssh (Ubuntu):
status: Fix Committed → Fix Released
Changed in openssh (Ubuntu Karmic):
status: New → Confirmed
importance: Undecided → Low
Changed in openssh (Ubuntu Intrepid):
status: New → Triaged
importance: Undecided → Low
Changed in openssh (Ubuntu Jaunty):
importance: Undecided → Low
Changed in openssh (Ubuntu Intrepid):
assignee: nobody → Ubuntu Security Team (ubuntu-security)
Changed in openssh (Ubuntu Jaunty):
status: New → Won't Fix
Changed in openssh (Ubuntu Karmic):
status: Confirmed → Won't Fix
Jamie Strandboge (jdstrand) wrote :

Ubuntu 9.04 and 9.10 have a backported patch to make the chances for a successful attack even smaller:
openssh (1:5.1p1-5) unstable; urgency=low

  * Backport from upstream CVS (Markus Friedl):
    - packet_disconnect() on padding error, too. Should reduce the success
      probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18.

Marking the 9.10 task as "Won't fix" (and added 9.04 for completeness). Added 8.10 task and will backport the packet_disconnect() patch with the next 8.10 openssh security update.

For those that want to address this fully, from
"AES CTR mode and arcfour ciphers are not vulnerable to this attack at
all. These may be preferentially selected by placing the following
directive in sshd_config and ssh_config:

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

Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the
report. The bug has been fixed in newer releases of Ubuntu.

Changed in openssh (Ubuntu Intrepid):
assignee: Ubuntu Security Team (ubuntu-security) → nobody
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public Security information  Edit
Everyone can see this security related information.

Other bug subscribers