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. 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: https://www.gitorious.org/gnutls/gnutls/source/8d7d6c6:lib/gnutls_handshake.c#L1747
Created attachment 899870 [details] Patch from Nikos Mavrogiannopoulos
Acknowledgment: Red Hat would like to thank GnuTLS upstream for reporting this issue. Upstream acknowledges Joonas Kuorilehto of Codenomicon as the original reporter.
Public now via GNUTLS-SA-2014-3: http://www.gnutls.org/security.html#GNUTLS-SA-2014-3 Fixed in GnuTLS versions 3.1.25, 3.2.15, and 3.3.3: http://lists.gnutls.org/pipermail/gnutls-devel/2014-May/006944.html http://lists.gnutls.org/pipermail/gnutls-devel/2014-May/006945.html http://lists.gnutls.org/pipermail/gnutls-devel/2014-May/006946.html Upstream commit: https://www.gitorious.org/gnutls/gnutls/commit/688ea6428a432c39203d00acd1af0e7684e5ddfd Upstream test case for this issue: https://www.gitorious.org/gnutls/gnutls/commit/a7be326f0e33cf7ce52b36474c157f782d9ca977
Created mingw-gnutls tracking bugs for this issue: Affects: fedora-all [bug 1103047]
Created gnutls tracking bugs for this issue: Affects: fedora-all [bug 1103046]
Created mingw32-gnutls tracking bugs for this issue: Affects: epel-5 [bug 1103048]
Is 2.12.x also vulnerable?
Err, I meant: 2.x (2.6? 2.8)
It seems the issue was first introduced via the following commit: https://www.gitorious.org/gnutls/gnutls/commit/8a6517a2#lib/gnutls_handshake.c which pre-dates 1.0.0 by few years.
This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2014:0595 https://rhn.redhat.com/errata/RHSA-2014-0595.html
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2014:0594 https://rhn.redhat.com/errata/RHSA-2014-0594.html
gnutls-3.1.25-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
IssueDescription: A flaw was found in the way GnuTLS parsed session IDs from ServerHello messages of the TLS/SSL handshake. A malicious server could use this flaw to send an excessively long session ID value, which would trigger a buffer overflow in a connecting TLS/SSL client application using GnuTLS, causing the client application to crash or, possibly, execute arbitrary code.
mingw-gnutls-3.1.25-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
mingw-gnutls-3.1.25-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
gnutls-3.1.20-5.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in following products: Red Hat Enterprise Linux 7 Via RHSA-2014:0684 https://rhn.redhat.com/errata/RHSA-2014-0684.html
This issue has been addressed in following products: RHEV-H and Agents for RHEL-6 Via RHSA-2014:0815 https://rhn.redhat.com/errata/RHSA-2014-0815.html