summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/network/1894781
blob: ff686d44e79203fd3884d081d1e07249cb3f50ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
semantic: 0.953
assembly: 0.947
instruction: 0.946
network: 0.938
other: 0.938
graphic: 0.927
device: 0.922
boot: 0.907
socket: 0.819
KVM: 0.766
vnc: 0.705
mistranslation: 0.673

[Feature request] Provide a way to do TLS first in QEMU/NBD connections (not after NBD negotiation)

(following from https://gitlab.com/libvirt/libvirt/-/issues/68#note_400960567)

As is very well explained in https://www.berrange.com/posts/2016/04/05/improving-qemu-security-part-5-tls-support-for-nbd-server-client/, and easily confirmed with captures, NBD stream starts in cleartext and upgrades to TLS inline (similar to STARTTLS mechanism). As a rationale, it is stated that this provides better error messages for the user of NBD.

However, this approach has downsides:

1) Clear indication to a network observer that NBD (and therefore likely qemu/libvirt) is used. In contrast, TLS1.3 hides even the SNI of the servers (ESNI, https://blog.cloudflare.com/encrypted-sni/).
2) Potential for bugs in NBD protocol negotiation code. That code just statistically, likely less looked at code than gnutls. This is not a reflection on NBD code quality, just the fact that TLS code does receive a bit more scrutiny. 
3) Inability to inspect TLS listener interface for compliance, e.g. with a security scanner. Making sure TLS listeners only select certain ciphersuits is a requirement of some compliance regimes. 

I think it's fully possible to satisfy the original requirement of good error messages as well, detecting that the other end is initiating TLS connection.

It's very unlikely that it's currently sae to recommend to run QEMU migration stream over a hostile network, but it should be possible to do with TLS only option.

Solution to this, just like in the case of SMTP, is to provide TLS only option (no initial cleartext at all) for QEMU migration, which hopefully it not a large addition.

Thank you for your consideration!

On 9/7/20 11:00 PM, Vjaceslavs Klimovs wrote:
> Public bug reported:
> 
> (following from
> https://gitlab.com/libvirt/libvirt/-/issues/68#note_400960567)
> 
> As is very well explained in https://www.berrange.com/posts/2016/04/05
> /improving-qemu-security-part-5-tls-support-for-nbd-server-client/, and
> easily confirmed with captures, NBD stream starts in cleartext and
> upgrades to TLS inline (similar to STARTTLS mechanism). As a rationale,
> it is stated that this provides better error messages for the user of
> NBD.
> 
> However, this approach has downsides:
> 
> 1) Clear indication to a network observer that NBD (and therefore likely qemu/libvirt) is used.

qemu/libvirt is not the only client of NBD.  In fact, the nbdkit and 
libnbd projects exist to make it easier to utilize NBD from more places.

> In contrast, TLS1.3 hides even the SNI of the servers (ESNI, https://blog.cloudflare.com/encrypted-sni/).
> 2) Potential for bugs in NBD protocol negotiation code. That code just statistically, likely less looked at code than gnutls. This is not a reflection on NBD code quality, just the fact that TLS code does receive a bit more scrutiny.

This is a non-argument.  When configured correctly at the NBD server, 
the NBD_OPT_STARTTLS option is the _only_ option accepted by a client, 
at which point you are right back into TLS code (from gnutls or 
elsewhere) and using the existing TLS libraries to establish the 
connection - but that is the SAME thing you would have to do even if 
there were a way to connect to an NBD server that doesn't even start 
with plaintext handshaking.

> 3) Inability to inspect TLS listener interface for compliance, e.g. with a security scanner. Making sure TLS listeners only select certain ciphersuits is a requirement of some compliance regimes.
> 
> I think it's fully possible to satisfy the original requirement of good
> error messages as well, detecting that the other end is initiating TLS
> connection.

If you are going to make a change in this area, it will need to be 
agreed on in the upstream NBD list, where _all_ implementations of NBD 
(both client and server) can weigh in; qemu will not change in a vacuum 
without upstream protocol concurrence.

https://lists.debian.org/nbd/

> 
> It's very unlikely that it's currently sae to recommend to run QEMU
> migration stream over a hostile network, but it should be possible to do
> with TLS only option.

It is very easy to write both servers and clients that require a 
transition from plaintext into TLS before any serious traffic is sent.

> 
> Solution to this, just like in the case of SMTP, is to provide TLS only
> option (no initial cleartext at all) for QEMU migration, which hopefully
> it not a large addition.
> 
> Thank you for your consideration!
> 
> ** Affects: qemu
>       Importance: Undecided
>           Status: New
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



The QEMU project is currently moving its bug tracking to another system.
For this we need to know which bugs are still valid and which could be
closed already. Thus we are setting the bug state to "Incomplete" now.

If the bug has already been fixed in the latest upstream version of QEMU,
then please close this ticket as "Fix released".

If it is not fixed yet and you think that this bug report here is still
valid, then you have two options:

1) If you already have an account on gitlab.com, please open a new ticket
for this problem in our new tracker here:

    https://gitlab.com/qemu-project/qemu/-/issues

and then close this ticket here on Launchpad (or let it expire auto-
matically after 60 days). Please mention the URL of this bug ticket on
Launchpad in the new ticket on GitLab.

2) If you don't have an account on gitlab.com and don't intend to get
one, but still would like to keep this ticket opened, then please switch
the state back to "New" or "Confirmed" within the next 60 days (other-
wise it will get closed as "Expired"). We will then eventually migrate
the ticket automatically to the new system (but you won't be the reporter
of the bug in the new system and thus you won't get notified on changes
anymore).

Thank you and sorry for the inconvenience.



This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/282