Re: [TLS] DTLS lost connection on server side

Michael Tuexen <Michael.Tuexen@lurchi.franken.de> Wed, 21 August 2013 11:23 UTC

Return-Path: <Michael.Tuexen@lurchi.franken.de>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9078411E81FD for <tls@ietfa.amsl.com>; Wed, 21 Aug 2013 04:23:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52y8zRP+-5ia for <tls@ietfa.amsl.com>; Wed, 21 Aug 2013 04:23:16 -0700 (PDT)
Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by ietfa.amsl.com (Postfix) with ESMTP id C8BF611E81E8 for <tls@ietf.org>; Wed, 21 Aug 2013 04:23:15 -0700 (PDT)
Received: from [192.168.1.200] (p508F1AF6.dip0.t-ipconnect.de [80.143.26.246]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 965B51C0C069E; Wed, 21 Aug 2013 13:23:13 +0200 (CEST)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
From: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
In-Reply-To: <52149C52.9090506@hauke-m.de>
Date: Wed, 21 Aug 2013 13:23:12 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <6CD75BF8-92D3-4F43-9DD8-F243EADF84E6@lurchi.franken.de>
References: <52149C52.9090506@hauke-m.de>
To: Hauke Mehrtens <hauke@hauke-m.de>
X-Mailer: Apple Mail (2.1508)
Cc: tls@ietf.org
Subject: Re: [TLS] DTLS lost connection on server side
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Aug 2013 11:23:16 -0000

On Aug 21, 2013, at 12:54 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:

> This problem is similar to the problem described in RFC6347 section
> 4.2.8. Establishing New Associations with Existing Parameters.
> 
> We have a DTLS Server S and a DTLS Client C which did a successful
> handshake and have an encrypted connection.
> 
> 
> 1. S looses its state (e.g., after a reboot) and C does not get informed
> about that.
> 2. C send an encrypted application data package to S, because C does not
> know that S lost its state and it has some new data.
> 3. S send a unencrypted fatal unexpected_message alert, because it does
> not have any connection with C and is unable to decrypt the message or
> encrypt the alert.
> 
> What should C now do with this alert?
> 
> A: Ignore it, because it thinks it has an encrypted channel with the
> other peer.
> 	Then it will never be able to send a package to the other peer.
> 
> B: Handle it and try to do a new DTLS handshake with the peer.
> 	Now any attacker would be able to reset the connection with just
> sending an unencrypted alert.
> 
> C: Ignore it and wait till some timeout and do a new handshake.
> 	It takes some time till the new connection will be established.
I would suggest to use
http://tools.ietf.org/html/rfc6520
and allow C to detect that the peer is gone. Then reconnect.
Dead peer detection is one of the use cases for DTLS heartbeats.

Best regards
Michael
> 
> Hauke
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>