|
|
Subscribe / Log in / New account

Security

Let's talk about perfect forward secrecy

By Nathan Willis
November 6, 2013

Perfect forward secrecy (PFS) is a security feature that comes up fairly regularly in debates about privacy, but historically it gets little discussion. At least, far less discussion than what are perceived as "core" features of a cryptosystem like key strength, message verification, or the web of trust. But that disparity is in part the result of a perception that PFS guards against some unlikely attack scenarios, such as a well-funded adversary capturing months or years' worth of traffic. Thanks to the recent revelations of bulk NSA surveillance, however, those scenarios suddenly seem a lot less unlikely to a lot of users, so PFS is attracting considerable attention.

The basic definition of forward secrecy is that compromising one encrypted conversation does not enable an attacker to then compromise any subsequent conversations. The simplest negative example would be using the same key to encrypt every session: if the key is discovered, the attacker can decrypt the current session and every session that follows. The fact that said attacker can also decrypt older sessions has not traditionally been a been part of the discussion (although it is true), probably because of the unlikelihood that most attackers would have been capturing sessions all along to begin with. After all, old SSL connection traffic is not recorded on servers at your favorite online shopping site—at least as far as anyone knows.

Thus, forward secrecy is a property that stems from how and when keys are generated and used, rather than from the ciphers involved. It essentially means that encryption keys must be ephemeral. Note that OpenPGP, for example, does not have forward secrecy, since its key pairs are by definition long-term assets. If a user's private key becomes public knowledge, the key can no longer be trusted by the user for future encryption and must be replaced, but all old messages encrypted with it are suddenly vulnerable to decryption, too.

There is a bit less agreement on what perfect forward secrecy means above and beyond mere forward secrecy (if indeed there is such a distinction), but the term PFS is typically used to indicate stronger guarantees against the domino-like compromise of one session from another. For example, if a long-term key is used to algorithmically derive a new ephemeral key for each session, some would argue that the forward secrecy is not "perfect." In such a scenario, if a session's ephemeral key was captured, no other sessions could be decrypted with it, but if the long-term key was captured, deriving the session keys—for multiple sessions—might be possible. Which key-derivation schemes and key-exchange protocols are perfect enough to count as PFS varies somewhat in the reading material. In common usage, however, the distinction rarely even comes into play, probably because so few encryption implementations in the wild offer forward secrecy at all.

PFS is a tad peculiar in at least one sense: it describes a property of a particular session that only provides protection to other sessions. That is, the presence or absence of PFS only comes into play when at least one private conversation has been decrypted (or one secret key can been captured). Perhaps it is no wonder, then, that it would remain an afterthought to hardening the rest of the system.

Present perfect

In practice, whether or not any given Internet connection has PFS depends on several factors. First and foremost is the availability of a key-exchange protocol that has PFS, but second is the practical question of whether the two parties in the conversation can agree on a PFS key exchange. That, of course, depends on things outside of the individual's control, such as the configuration of the remote web server.

The Diffie–Hellman key exchange protocol can offer PFS if it generates a new key (by using a new set of parameters) for every session. This is the default behavior, and the great majority of implementations use ephemeral parameters, but for clarity it is common to refer to this behavior as "ephemeral Diffie–Hellman" (EDH or DHE), just to be on the safe side.

PGP-style encryption, as it was noted above, does not offer PFS. But SSH does, since SSH session keys are ephemeral and are exchanged between hosts using DHE. Similarly, the Off-the-Record Messaging (OTR) protocol for instant messages uses DHE for key exchange, so it too offers PFS (in addition to several other privacy and security features). IPSec supports PFS as an option; when enabled, a new DHE key exchange is performed for each new session. But as a percentage of total Internet connections, all of these protocols account for but a fraction when compared to SSL/TLS, which is where the practical problem lies.

The SSL/TLS protocol supports a wide array of "cipher suites." Each cipher suite is a specific combination of a key-exchange algorithm, encryption algorithm, message authentication code, and pseudorandom function. In the handshake step of connection establishment, the client (e.g., web browser) and server each have their own cipher suite preferences; the client presents its list to the server, which is supposed to choose the top option that is supported by both.

DHE and its variant Elliptic Curve DHE (ECDHE) are two of the available options for key exchange, so users would be wise to place them at the top of their cipher-suite preferences. However, the majority of public web servers does not support DHE or ECDHE, so in practice most HTTPS connections are established without PFS. In June 2013, Netcraft published a look at PFS on the web, noting that of the eight most popular web service providers mentioned in the NSA surveillance scandal (Facebook, Twitter, Yahoo, Google, Microsoft, AOL, Apple, and Paltalk), only Google's servers negotiated for a PFS cipher suite during connection.

Most of the remaining web servers simply use public-key encryption to protect connection setup instead, with the client encrypting its part of the handshake with the server's public SSL certificate. The curious can investigate any server's configuration with SSL Labs's server test tool. While the RSA algorithm used for certificates has proven itself quite resistant to attack, to many it is not sufficient for NSA-proofing an SSL/TLS connection. A government agency could obtain the server's private key (i.e., the secret key which complements the SSL certificate that clients use to encrypt those initial messages to the server) with a court order or warrant, at which point any captured SSL/TLS connection from the server could be decrypted.

Naturally, an attacker in possession of the private key corresponding to the server's public SSL certificate can also do plenty of other bad things like man-in-the-middle attacks, so to some, worrying about PFS may sound like small potatoes. On the other hand, for many web users, government surveillance amounts to a different—not a lesser—threat. Strong cryptography might be the best safeguard against thieves and scammers, but PFS is the medicine prescribed for state-supported spying.

Forward progress

The good news is that all of the major free software browsers support PFS cipher suites for SSL/TLS, as do the free software web server projects. Among the servers, nginx is configured to prefer PFS cipher suites by default, and configuring the others to negotiate for it is a relatively simple affair.

Of course, Google only switched over to the PFS-enabled cipher suites on its web servers in 2011; any traffic captured before that could still (at least in theory) be decrypted if the right keys were found.

Looking forward, the NSA surveillance revelations have prompted a renewed interest in PFS, so there are a lot of discussions on Stack Exchange and similar forums about how to configure web servers to prefer PFS. The tide may indeed be changing, but some server administrators may be surprised to discover the costs associated with ephemeral key generation. Prior to the NSA story, there were several popular blog posts on the overhead that enabling DHE and ECDHE for SSL/TLS would impose on a web server. In 2011, for example, Vincent Bernat estimated DHE at a 300% performance hit, but ECDHE at only a 15–27% increase.

Whether such an increase in CPU cycles (and, potentially, hosting costs) is worth it is a question only the server owner can answer. As CPUs get faster over time, of course, the bottom-line calculations could change. But PFS is meant to protect the participants in a conversation for a very long time—hypothetically an attacker could store captured traffic forever. And in the very long run, the additional protections of PFS could be worth a high price indeed.

Comments (14 posted)

Brief items

Security quotes of the week

Apple is fighting back with a "warrant canary": they've published a transparency report [PDF] that states "Apple has never received an order under Section 215 of the USA Patriot Act. We would expect to challenge an order if served on us." If they are served with a 215 order in future, their next transparency report will drop this language, omitting any mention of 215, and keen-eyed watchers will know that they've been subjected to a secret order. I proposed a more ambitious version of this in September, though I was hardly the first person to suggest it. Good for Apple for using it.
Cory Doctorow

Trust is crucial to the adoption of strong cryptographic algorithms. To ensure that our guidance has been developed according the highest standard of inclusiveness, transparency and security, NIST has initiated a formal review of our standards development efforts. We are compiling our goals and objectives, principles of operation, processes for identifying cryptographic algorithms for standardization, methods for reviewing and resolving public comments, and other important procedures necessary for a rigorous process.

Once complete, we will invite public comment on this process. We also will bring in an independent organization to conduct a formal review of our standards development approach and to suggest improvements. Based on the public comments and independent review, we will update our process as necessary to make sure it meets our goals for openness and transparency, and leads to the most secure, trustworthy guidance practicable.

US National Institute of Standards and Technology (NIST)

In light of this, PRISM is really just insurance: a way for the NSA to get legal cover for information it already has. My guess is that the NSA collects the vast majority of its data surreptitiously, using programs such as these. Then, when it has to share the information with the FBI or other organizations, it gets it again through a more public program like PRISM.

What this really shows is how robust the surveillance state is, and how hard it will be to craft laws reining in the NSA. All the bills being discussed so far only address portions of the problem: specific programs or specific legal justifications. But the NSA's surveillance infrastructure is much more robust than that. It has many ways into our data, and all sorts of tricks to get around the law

Bruce Schneier on the Google/Yahoo private network tapping news

I think we should celebrate and support Ladar [Levison, owner of Lavabit] for making the hard choice that he did to at least speak out and let his users know they’d been compromised. However, I think we should simultaneously be extremely critical of the technical choices and false guarantees that put Ladar in that position. There is current an effort underway to release the Lavabit infrastructure under an open source license, which I worry will result in more of the same. Given its technical foundations, I wouldn’t advocate supporting the continuation of the Lavabit project.
Moxie Marlinspike analyzes Lavabit's security and notes some alternatives

Comments (8 posted)

New vulnerabilities

GraphicsMagick: denial of service

Package(s):GraphicsMagick CVE #(s):CVE-2013-4589
Created:November 4, 2013 Updated:December 1, 2013
Description: From the Red Hat bugzilla:

GraphicsMagick, a comprehensive image processing package, is found to have a vulnerability which can be exploited by malicious people to cause a Denial of Service (DoS).

The vulnerability is caused due to an error within the "ExportAlphaQuantumType()" function found in magick/export.c when exporting 8-bit RGBA images, which can be exploited to cause a crash.

Alerts:
Mageia MGASA-2013-0355 graphicsmagick 2013-11-30
Fedora FEDORA-2013-19307 GraphicsMagick 2013-11-02
Mageia MGASA-2013-0350 graphicsmagick 2013-11-22

Comments (none posted)

kernel: privilege escalation

Package(s):kernel CVE #(s):CVE-2013-4470
Created:November 5, 2013 Updated:March 28, 2014
Description: From the Red Hat bugzilla:

Linux kernel built with an Ethernet driver(ex virtio-net) which has UDP Fragmentation Offload(UFO) feature ON is vulnerable to a memory corruption flaw when UDP_CORK socket option is set. It could occur when sending large messages, wherein not all messages are greater than maximum transfer unit(MTU) of the underlying medium.

An unprivileged user/program could use this flaw to crash the kernel resulting in DoS, or potentially escalate their privileges on the system.

Alerts:
Oracle ELSA-2014-1392 kernel 2014-10-21
Ubuntu USN-2233-1 kernel 2014-06-05
Ubuntu USN-2234-1 EC2 kernel 2014-06-05
openSUSE openSUSE-SU-2014:0766-1 Evergreen 2014-06-06
SUSE SUSE-SU-2014:0696-1 Linux kernel 2014-05-22
SUSE SUSE-SU-2014:0536-1 Linux kernel 2014-04-16
SUSE SUSE-SU-2014:0537-1 Linux kernel 2014-04-17
SUSE SUSE-SU-2014:0531-1 Linux kernel 2014-04-16
SUSE SUSE-SU-2014:0459-1 Linux Kernel 2014-03-28
Red Hat RHSA-2014:0284-01 kernel 2014-03-11
Red Hat RHSA-2014:0100-01 kernel-rt 2014-01-28
Ubuntu USN-2067-1 linux-ti-omap4 2014-01-03
Ubuntu USN-2069-1 linux-lts-raring 2014-01-03
Ubuntu USN-2073-1 kernel 2014-01-03
Ubuntu USN-2066-1 kernel 2014-01-03
Oracle ELSA-2014-3002 kernel 2014-02-12
Mageia MGASA-2013-0375 kernel-vserver 2013-12-18
Mageia MGASA-2013-0373 kernel-tmb 2013-12-18
Mageia MGASA-2013-0374 kernel-rt 2013-12-18
Mageia MGASA-2013-0372 kernel-linus 2013-12-18
Mageia MGASA-2013-0371 kernel 2013-12-17
Scientific Linux SLSA-2013:1801-1 kernel 2013-12-16
Oracle ELSA-2013-1801 kernel 2013-12-12
CentOS CESA-2013:1801 kernel 2013-12-13
Red Hat RHSA-2013:1801-01 kernel 2013-12-12
Ubuntu USN-2050-1 linux-ti-omap4 2013-12-07
Ubuntu USN-2049-1 kernel 2013-12-07
Ubuntu USN-2046-1 linux-ti-omap4 2013-12-03
Ubuntu USN-2044-1 linux-ti-omap4 2013-12-03
Ubuntu USN-2042-1 linux-lts-saucy 2013-12-03
Ubuntu USN-2040-1 linux-lts-quantal 2013-12-03
Ubuntu USN-2043-1 kernel 2013-12-03
Mageia MGASA-2013-0342 kernel 2013-11-22
Fedora FEDORA-2013-20748 kernel 2013-11-13
Mageia MGASA-2013-0346 kernel-vserver 2013-11-22
Mageia MGASA-2013-0344 kernel-tmb 2013-11-22
Mageia MGASA-2013-0345 kernel-rt 2013-11-22
Mandriva MDVSA-2013:265 kernel 2013-11-10
Fedora FEDORA-2013-20547 kernel 2013-11-05
Mageia MGASA-2013-0343 kernel-linus 2013-11-22

Comments (none posted)

kernel-rt: denial of service

Package(s):kernel-rt CVE #(s):CVE-2013-4348
Created:November 1, 2013 Updated:November 13, 2013
Description:

From the Red Hat advisory:

A flaw was found in the way IP packets with an Internet Header Length (ihl) of zero were processed in the skb_flow_dissect() function in the Linux kernel. A remote attacker could use this flaw to trigger an infinite loop in the kernel, leading to a denial of service. (CVE-2013-4348, Important)

Alerts:
Oracle ELSA-2014-3049 kernel 2014-07-24
Ubuntu USN-2070-1 linux-lts-saucy 2014-01-03
Ubuntu USN-2075-1 kernel 2014-01-03
Mageia MGASA-2013-0375 kernel-vserver 2013-12-18
Mageia MGASA-2013-0373 kernel-tmb 2013-12-18
Mageia MGASA-2013-0374 kernel-rt 2013-12-18
Mageia MGASA-2013-0372 kernel-linus 2013-12-18
Mageia MGASA-2013-0371 kernel 2013-12-17
openSUSE openSUSE-SU-2014:0204-1 kernel 2014-02-06
Mageia MGASA-2013-0342 kernel 2013-11-22
Fedora FEDORA-2013-20748 kernel 2013-11-13
Mageia MGASA-2013-0346 kernel-vserver 2013-11-22
Mageia MGASA-2013-0344 kernel-tmb 2013-11-22
Mageia MGASA-2013-0345 kernel-rt 2013-11-22
Mandriva MDVSA-2013:265 kernel 2013-11-10
Fedora FEDORA-2013-20547 kernel 2013-11-05
Red Hat RHSA-2013:1490-01 kernel-rt 2013-10-31
Mageia MGASA-2013-0343 kernel-linus 2013-11-22

Comments (none posted)

libav: code execution

Package(s):libav CVE #(s):
Created:November 4, 2013 Updated:November 11, 2013
Description: From the Ubuntu advisory:

It was discovered that Libav incorrectly handled certain malformed media files. If a user were tricked into opening a crafted media file, an attacker could cause a denial of service via application crash, or possibly execute arbitrary code with the privileges of the user invoking the program.

Alerts:
Ubuntu USN-2025-1 libav 2013-11-11
Ubuntu USN-2011-1 libav 2013-11-04

Comments (none posted)

lightdm: information leak

Package(s):lightdm CVE #(s):CVE-2013-4459
Created:November 6, 2013 Updated:November 6, 2013
Description: From the Ubuntu advisory:

Christian Prim discovered that Light Display Manager incorrectly applied the AppArmor security profile when the Guest account is used. A local attacker could use this issue to possibly gain access to sensitive information.

Alerts:
Ubuntu USN-2012-1 lightdm 2013-11-06

Comments (none posted)

mednafen: code execution

Package(s):mednafen CVE #(s):CVE-2010-3085
Created:November 4, 2013 Updated:November 6, 2013
Description: From the CVE entry:

The network-play implementation in Mednafen before 0.8.D might allow remote servers to execute arbitrary code via unspecified vectors, related to "stack manipulation" issues.

Alerts:
Gentoo 201311-01 mednafen 2013-11-04

Comments (none posted)

phpmyadmin: multiple vulnerabilities

Package(s):phpmyadmin CVE #(s):CVE-2013-4997 CVE-2013-4999 CVE-2013-5001
Created:November 4, 2013 Updated:July 30, 2014
Description: From the CVE entries:

Multiple cross-site scripting (XSS) vulnerabilities in phpMyAdmin 3.5.x before 3.5.8.2 allow remote attackers to inject arbitrary web script or HTML via vectors involving a JavaScript event in (1) an anchor identifier to setup/index.php or (2) a chartTitle (aka chart title) value. (CVE-2013-4997)

phpMyAdmin 4.0.x before 4.0.4.2 allows remote attackers to obtain sensitive information via an invalid request, which reveals the installation path in an error message, related to Error.class.php and Error_Handler.class.php. (CVE-2013-4999)

Cross-site scripting (XSS) vulnerability in libraries/plugins/transformations/abstract/TextLinkTransformationsPlugin.class.php in phpMyAdmin 4.0.x before 4.0.4.2 allows remote authenticated users to inject arbitrary web script or HTML via a crafted object name associated with a TextLinkTransformationPlugin link. (CVE-2013-5001)

Alerts:
Fedora FEDORA-2014-8577 phpMyAdmin 2014-07-30
Fedora FEDORA-2014-8581 phpMyAdmin 2014-07-30
Gentoo 201311-02 phpmyadmin 2013-11-04

Comments (none posted)

python-backports-ssl_match_hostname: invalid hostname matching

Package(s):python-backports-ssl_match_hostname CVE #(s):
Created:November 5, 2013 Updated:November 6, 2013
Description: From the Python advisory:

Ryan Sleevi of the Google Chrome Security Team has informed us about another issue that is caused by our failure to implement RFC 6125 wildcard matching rules. RFC 6125 allows only one wildcard in the left-most fragment of a hostname. For security reasons matching rules like *.*.com should be not supported.

For wildcards in internationalized domain names I have followed the piece of advice "In the face of ambiguity, refuse the temptation to guess.". A substring wildcard does no longer match an IDN A-label fragment. '*' still matches a full punycode fragment but 'x*' no longer matches 'xn--foo'.

Alerts:
Fedora FEDORA-2013-20200 python-backports-ssl_match_hostname 2013-11-06
Fedora FEDORA-2013-20155 python-backports-ssl_match_hostname 2013-11-05

Comments (none posted)

strongswan: multiple vulnerabilities

Package(s):strongswan CVE #(s):CVE-2013-6075
Created:November 1, 2013 Updated:January 27, 2014
Description:

From the Debian advisory:

A vulnerability has been found in the ASN.1 parser of strongSwan, an IKE daemon used to establish IPsec protected links.

By sending a crafted ID_DER_ASN1_DN ID payload to a vulnerable pluto or charon daemon, a malicious remote user can provoke a denial of service (daemon crash) or an authorization bypass (impersonating a different user, potentially acquiring VPN permissions she doesn't have).

Alerts:
Fedora FEDORA-2014-0567 strongswan 2014-01-25
Fedora FEDORA-2014-0516 strongswan 2014-01-25
openSUSE openSUSE-SU-2013:1646-1 strongswan 2013-11-09
openSUSE openSUSE-SU-2013:1651-1 strongswan 2013-11-09
Debian DSA-2789-1 strongswan 2013-11-01

Comments (none posted)

tryton-client: unintended file access

Package(s):tryton-client CVE #(s):
Created:November 4, 2013 Updated:November 6, 2013
Description: From the Debian advisory:

Cedric Krier discovered that the Tryton client does not sanitize the file extension supplied by the server when processing reports. As a result, a malicious server could send a report with a crafted file extension that causes the client to write any local file to which the user running the client has write access.

Alerts:
Debian DSA-2791-1 tryton-client 2013-11-04

Comments (none posted)

wireshark: multiple vulnerabilities

Package(s):wireshark CVE #(s):CVE-2013-6336 CVE-2013-6337 CVE-2013-6338 CVE-2013-6340
Created:November 5, 2013 Updated:November 11, 2013
Description: From the Debian advisory:

Multiple vulnerabilities were discovered in the dissectors for IEEE 802.15.4, NBAP, SIP and TCP, which could result in denial of service.

Alerts:
Scientific Linux SLSA-2014:0342-1 wireshark 2014-03-31
Oracle ELSA-2014-0342 wireshark 2014-03-31
CentOS CESA-2014:0342 wireshark 2014-03-31
Red Hat RHSA-2014:0342-01 wireshark 2014-03-31
Gentoo 201312-13 wireshark 2013-12-16
openSUSE openSUSE-SU-2013:1675-1 wireshark 2013-11-14
Mageia MGASA-2013-0347 wireshark 2013-11-22
Fedora FEDORA-2013-20985 wireshark 2013-11-11
Fedora FEDORA-2013-20829 wireshark 2013-11-08
Debian DSA-2792-1 wireshark 2013-11-04
Mandriva MDVSA-2013:279 wireshark 2013-11-22
openSUSE openSUSE-SU-2013:1671-1 wireshark 2013-11-14

Comments (none posted)

Page editor: Jake Edge
Next page: Kernel development>>


Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds