Another critical bug in an open source SSL/TLS (and DTLS) cryptographic library has been discovered and patched last week. The affected library is GnuTLS, and is used in a number of Linux-based operating systems as well as several hundreds Linux software packages.
“A flaw was found in the way GnuTLS parsed session ids from Server Hello packets of the TLS/SSL handshake. A malicious server could use this flaw to send an excessively long session id value and trigger a buffer overflow in a connecting TLS/SSL client using GnuTLS, causing it to crash or, possibly, execute arbitrary code,” Tomas Hoger explained in a post on the Red Hat Bug Tracker.
“The flaw is in read_server_hello() / _gnutls_read_server_hello(), where session_id_len is checked to not exceed incoming packet size, but not checked to ensure it does not exceed maximum session id length.”
The flaw (CVE-2014-3466) was discovered by Codenomicon researcher Joonas Kuorilehto. A patch has been created by GNU TLS developer Nikos Mavrogiannopoulos, and the GnuTLS organization has pushed out new GnuTLS versions (3.1.25, 3.2.15, 3.3.4) to which users are advised to update as soon as possible.
For a technical analysis of the flaw check out Radare’s official blog, where it is demonstrated that the vulnerability can, indeed, be exploited in real-world attacks.
The issue has apparently already been addressed in Red Hat Enterprise Linux 5 and 6, Fedora 20. The Debian project has also solved the issue and recommends users to upgrade their gnutls26 packages.