mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
1fb9fdc302
The DTLS implementation provides some protection against replay attacks in accordance with RFC6347 section 4.1.2.6. A sliding "window" of valid record sequence numbers is maintained with the "right" hand edge of the window set to the highest sequence number we have received so far. Records that arrive that are off the "left" hand edge of the window are rejected. Records within the window are checked against a list of records received so far. If we already received it then we also reject the new record. If we have not already received the record, or the sequence number is off the right hand edge of the window then we verify the MAC of the record. If MAC verification fails then we discard the record. Otherwise we mark the record as received. If the sequence number was off the right hand edge of the window, then we slide the window along so that the right hand edge is in line with the newly received sequence number. Records may arrive for future epochs, i.e. a record from after a CCS being sent, can arrive before the CCS does if the packets get re-ordered. As we have not yet received the CCS we are not yet in a position to decrypt or validate the MAC of those records. OpenSSL places those records on an unprocessed records queue. It additionally updates the window immediately, even though we have not yet verified the MAC. This will only occur if currently in a handshake/renegotiation. This could be exploited by an attacker by sending a record for the next epoch (which does not have to decrypt or have a valid MAC), with a very large sequence number. This means the right hand edge of the window is moved very far to the right, and all subsequent legitimate packets are dropped causing a denial of service. A similar effect can be achieved during the initial handshake. In this case there is no MAC key negotiated yet. Therefore an attacker can send a message for the current epoch with a very large sequence number. The code will process the record as normal. If the hanshake message sequence number (as opposed to the record sequence number that we have been talking about so far) is in the future then the injected message is bufferred to be handled later, but the window is still updated. Therefore all subsequent legitimate handshake records are dropped. This aspect is not considered a security issue because there are many ways for an attacker to disrupt the initial handshake and prevent it from completing successfully (e.g. injection of a handshake message will cause the Finished MAC to fail and the handshake to be aborted). This issue comes about as a result of trying to do replay protection, but having no integrity mechanism in place yet. Does it even make sense to have replay protection in epoch 0? That issue isn't addressed here though. This addressed an OCAP Audit issue. CVE-2016-2181 Reviewed-by: Richard Levitte <levitte@openssl.org> |
||
---|---|---|
apps | ||
Configurations | ||
crypto | ||
demos | ||
doc | ||
engines | ||
external/perl | ||
fuzz | ||
include | ||
ms | ||
os-dep | ||
ssl | ||
test | ||
tools | ||
util | ||
VMS | ||
.gitattributes | ||
.gitignore | ||
.travis-create-release.sh | ||
.travis.yml | ||
ACKNOWLEDGEMENTS | ||
appveyor.yml | ||
AUTHORS | ||
build.info | ||
CHANGES | ||
config | ||
config.com | ||
Configure | ||
CONTRIBUTING | ||
e_os.h | ||
FAQ | ||
INSTALL | ||
LICENSE | ||
Makefile.shared | ||
NEWS | ||
NOTES.DJGPP | ||
NOTES.PERL | ||
NOTES.VMS | ||
NOTES.WIN | ||
README | ||
README.ECC | ||
README.ENGINE | ||
README.FIPS |
OpenSSL 1.1.0-pre7-dev Copyright (c) 1998-2016 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. DESCRIPTION ----------- The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, fully featured, and Open Source toolkit implementing the Transport Layer Security (TLS) protocols (including SSLv3) as well as a full-strength general purpose cryptographic library. OpenSSL is descended from the SSLeay library developed by Eric A. Young and Tim J. Hudson. The OpenSSL toolkit is licensed under a dual-license (the OpenSSL license plus the SSLeay license), which means that you are free to get and use it for commercial and non-commercial purposes as long as you fulfill the conditions of both licenses. OVERVIEW -------- The OpenSSL toolkit includes: libssl (with platform specific naming): Provides the client and server-side implementations for SSLv3 and TLS. libcrypto (with platform specific naming): Provides general cryptographic and X.509 support needed by SSL/TLS but not logically part of it. openssl: A command line tool that can be used for: Creation of key parameters Creation of X.509 certificates, CSRs and CRLs Calculation of message digests Encryption and decryption SSL/TLS client and server tests Handling of S/MIME signed or encrypted mail And more... INSTALLATION ------------ See the appropriate file: INSTALL Linux, Unix, Windows, OpenVMS, ... NOTES.* INSTALL addendums for different platforms SUPPORT ------- See the OpenSSL website www.openssl.org for details on how to obtain commercial technical support. Free community support is available through the openssl-users email list (see https://www.openssl.org/community/mailinglists.html for further details). If you have any problems with OpenSSL then please take the following steps first: - Download the current snapshot from ftp://ftp.openssl.org/snapshot/ to see if the problem has already been addressed - Remove ASM versions of libraries - Remove compiler optimisation flags If you wish to report a bug then please include the following information in any bug report: - OpenSSL version: output of 'openssl version -a' - Any "Configure" options that you selected during compilation of the library if applicable (see INSTALL) - OS Name, Version, Hardware platform - Compiler Details (name, version) - Application Details (name, version) - Problem Description (steps that will reproduce the problem, if known) - Stack Traceback (if the application dumps core) Email the report to: rt@openssl.org In order to avoid spam, this is a moderated mailing list, and it might take a couple of days for the ticket to show up. (We also scan posts to make sure that security disclosures aren't publicly posted by mistake.) Mail to this address is recorded in the public RT (request tracker) database (see https://www.openssl.org/community/index.html#bugs for details) and also forwarded the public openssl-dev mailing list. Confidential mail may be sent to openssl-security@openssl.org (PGP key available from the key servers). Please do NOT use this for general assistance or support queries. Just because something doesn't work the way you expect does not mean it is necessarily a bug in OpenSSL. Use the openssl-users email list for this type of query. You can also make GitHub pull requests. See the CONTRIBUTING file for more details. HOW TO CONTRIBUTE TO OpenSSL ---------------------------- See CONTRIBUTING LEGALITIES ---------- A number of nations, in particular the U.S., restrict the use or export of cryptography. If you are potentially subject to such restrictions you should seek competent professional legal advice before attempting to develop or distribute cryptographic code.