Received: from eggs.gnu.org ([2001:4830:134:3::10]:37629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPtXz-0008SY-Lq for qemu-devel@nongnu.org; Fri, 05 Sep 2014 09:27:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPtXt-00089C-ID for qemu-devel@nongnu.org; Fri, 05 Sep 2014 09:27:27 -0400 Received: from barbershop.grep.be ([89.106.240.122]:43108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPtXt-00087p-Cc for qemu-devel@nongnu.org; Fri, 05 Sep 2014 09:27:21 -0400 Date: Fri, 5 Sep 2014 15:26:09 +0200 From: Wouter Verhelst Message-ID: <20140905132608.GB26974@grep.be> References: <20140903164417.GA32748@stefanha-thinkpad.redhat.com> <20140905084618.GA3720@Inspiron-3521> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140905084618.GA3720@Inspiron-3521> Subject: Re: [Qemu-devel] NBD TLS support in QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hani Benhabiles Cc: nbd-generic@lists.sf.net, libvir-list@redhat.com, mprivozn@redhat.com, nick@bytemark.co.uk, qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , Paolo Bonzini , w@uter.be On Fri, Sep 05, 2014 at 09:46:18AM +0100, Hani Benhabiles wrote: > On Wed, Sep 03, 2014 at 05:44:17PM +0100, Stefan Hajnoczi wrote: > > Hi, > > QEMU offers both NBD client and server functionality. The NBD protocol > > runs unencrypted, which is a problem when the client and server > > communicate over an untrusted network. > > > > The particular use case that prompted this mail is storage migration in > > OpenStack. The goal is to encrypt the NBD connection between source and > > destination hosts during storage migration. > > > > I think we can integrate TLS into the NBD protocol as an optional flag. > > A quick web search does not reveal existing open source SSL/TLS NBD > > implementations. I do see a VMware NBDSSL protocol but there is no > > specification so I guess it is proprietary. > > Not sold on this because: > - It requires (unnecessary) changes to the NBD specification. They may not be necessary from a libvirt/qemu point of view, but I've had requests to implement encryption from other people, too. So while they're not very high on my priority list, I do think the changes are necessary. > - It would still be vulnerable to a protocol downgrade attack: ie. An attacker > could strip the TLS flag from the server's response resulting in either: > * Connection fallback to cleartext, if both ends don't force TLS. > * Loss of backward compatibility, if one of the ends forces TLS, making the > reason for which such a flag is added moot IIUC. Tunneling the entire protocol inside an SSL connection doesn't fix that; if an attacker is able to hijack your TCP connections and change flags, then this attacker is also able to hijack your TCP connection and redirect it to a decrypting/encrypting proxy. I agree that preventing a possible SSL downgrade attack (and other forms of MITM) should be high on the priority list, but "tunnel the whole thing in SSL" doesn't do that. [...] -- Home is where you have to wash the dishes. -- #debian-devel, Freenode, 2004-09-22