Draft: draft-ietf-quic-load-balancers

Commentary: Added two sections to Security Considerations ( Stateless Reset Oracle and Local Configurations Only ) . and . 
 Can you speak a little about your reasoning for the recent changes ? If this attack is limited to extracting the identity of server instances for other co - hosted entities , that 's probably OK , but I 'm having trouble connecting the SHOULD here with the preceding text . 
 Sure . If an attacker has the same QUIC - LB config as the victim , then it can extract the server mapping , which defeats the whole point of the spec . Obviously , an LB must have the QUIC - LB config for servers it routes to . If I 'm an attacker within that group of servers I may already see the packet headers that give away the server mapping , so there 's little linkability here ( though there is a little ) . The moment I share configuration among multiple server pools , I 'm expanding the number of entities with access to the config , for no operational benefit except to make the administrator 's life easier . In the absurd limit , all of AWS has the same QUIC - LB config , and essentially everyone can extract the server mapping from any CID that goes to AWS . 
 Add a security consideration to avoid the following scenario : MyCloudProvider has a single QUIC - LB config for all its load balancers . It rotates keys periodically , etc , but everyone gets the same config . Obviously , all the attacker has to do is open an account with MyCloudProvider and it is able to recover all the server IDs . Configs ought to be restricted to load balancers serving a finite set of servers . It is possible another MyCloudProvider customer is in the pool behind that load balancer , but that 's already a privileged position as already described in the draft . Obviously , this will require some wordsmithing , as the statement above is n't very precise . 
 As server clusters increase in size , the need to reallocate server identifiers becomes more acute . In one model , the configuration ID is used to indicate a stable routing configuration . Server identifiers for a given configuration ID are routed to the same server , no matter how many other instances are or removed . In order to allow for changes in the cluster , the configuration ID is used so that old servers can be removed from consideration and new ones . If these changes happen frequently enough , the number of bits allocated to identifying a configuration might be insufficient . Why not make the length of the identifier flexible ? That might mean that you need to make the length of the length similarly configurable . 
 It was not the intent of these bits to support long - lived configurations , instead supporting key rotation , upgrades , and the like . I would much rather people overprovisioned the server ID space than using this tool , TBH . However , the only cost is limiting the theoretical size of CIDs . At the moment , we can support up to 64B , future - proofing the encodings against future versions of QUIC . I 'm open to another bit for this , but how would a configurable number of CR bits work with multiple configurations ? How does a config that needs 5 bits and one that needs 2 coexist , especially if the latter needs length self - encoding ? 
 As we talk through the implications of mutually mistrustful servers in , I think the case for adding another bit is compelling . I 'm going to remove the needs - discussion label and come up with a PR that takes another bit . 
 I 'm returning this to needs - discussion , as points out there is a privacy tradeoff here . If the config codespace is large , it 's straightforward to have each mistrustful server have its own totally unique config . On the other hand , keeping this long - lived config difference leaks the type of flow . Assuming it 's routed based on SNI , it leaks the SNI of each CID , and in that sense also increases linkability . 
 Alright , I 've reflected on this a bit more . In general , different server entities will have different external IP addresses   , so the load balancer can distinguish the correct QUIC - LB config without resorting to the CR bits . As IP and port are visible to everyone , there is no privacy leakage . The problem occurs when mutually mistrustful servers share the same IP / port and are switched on something else . That " something " may be something present only in the client hello , with the classical load balancer simply using the 4tuple after that . The only thing I am aware of in practice is the SNI . If there are others , please say so in this thread . If the SNI is encrypted , the unprivileged LB envisioned in QUIC - LB does not have access to it . So we can assume this use case only applies to unencrypted SNI . Option 1 : mistrustful servers share the same config . a third party will be able to extract your server mapping , but in practice it will be hard for an attacker to obtain this position on purpose . If this is the best outcome , we can stick with 2 config rotation bits . Option 2 : Issue them different config rotation codepoints . So an observer can see the SNI and associate it with certain CR bits ; if the client later migrates , it will still be able to associate that connection with that SNI . If this is better than Option 1 , we should probably add a third config rotation bit . Other ( minor ) costs of having 3 config rotation bits : length self - encoding can only support 31 byte connection IDs , instead of 63 ( obviously this is only relevant for hypothetical future versions of QUIC ) each config can have its own set of server IDs . So there is considerably more config state at the LB . As SIDs can be up to 18B , it 's 18B x ( # of servers ) x ( # of config rotation codepoints ) . This memory footprint will roughly double by going from 3 to 7 codepoints . I 've talked myself into Option 1 as being a mildly better situation , thus sticking with 2 CR bits . 
 Update : the ECHO design might allow the LB privileged access to the SNI , so it might be encrypted . However , an attacker could connect to the domains at that IP and obtain the config rotation bits . So option 2 actually circumvents ESNI entirely ! 
 Closing -- I have received no pushback on doing nothing ( leaving it at 2 bits ) , so I 'm going to do nothing . 
 The draft does n't address the impact of each method of connection ID generation on how servers can use stateless resets . Most of this is likely bound up in decisions stemming from . If you can guess a valid but unused connection ID , then you might be able to induce a stateless reset that could be used to kill an open connection . As the draft only includes methods that include an explicit server identifier , it is possible that as long as valid values can not be guessed , the effect is minimal and each server instance can have its own configured stateless reset key ( or a shared key from which a per - server key is derived using a KDF ) . 
 I do n't understand the attack here . A given CID will deterministically map to a specific server instance . So there is no way for another server to receive a packet with that CID and generate a stateless reset . What am I missing ? < strikeThere might be something here with the differing treatment of long - header vs. short - header packets , ( and the option for servers to send resets on long headers ) , but I 'll have to think about it more.</strike 
 As to the last point , nope : even a long header with a DCID that conforms to the server 's expectations ( i.e. maps to a real server ) will get delivered to that server , so I do n't think that 's an attack . 
 Should we talk about this issue more , or are you satisfied enough that I can close it ? 
 I do n't see any mention of stateless reset in the draft at all . That 's probably something worth addressing , even if it is to say what you have already .
A simple deployment of QUIC-LB in a cloud provider might use the same
global QUIC-LB configuration across all its load balancers that route
to customer servers.  An attacker could then simply become a
customer, obtain the configuration, and then extract server IDs of
other customers' connections at will.
To avoid this, the configuration agent SHOULD issue QUIC-LB
configurations to mutually distrustful servers that have different
keys (for the block cipher or stream cipher algorithms) or routing
masks and divisors (for the obfuscated algorithm).  The load
balancers can distinguish these configurations by external IP
address, or by assigning different values to the config rotation bits
(config-rotation).  Note that either of these techniques exposes
information to outside observers, as traffic destined for each server
set can be easily distinguished.
These techniques are not necessary for the plaintext algorithm, as it
does not attempt to conceal the server ID.
Section 21.9 of QUIC-TRANSPORT discusses the Stateless Reset Oracle
attack.  For a server deployment to be vulnerable, an attacking
client must be able to cause two packets with the same Destination
CID to arrive at two different servers that share the same
cryptographic context for Stateless Reset tokens.  As QUIC-LB
requires deterministic routing of DCIDs over the life of a
connection, it is a sufficient means of avoiding an Oracle without
additional measures.