RFR 8211018: Session Resumption without Server-Side State

Anthony Scarpino anthony.scarpino at oracle.com
Thu Jun 6 03:25:59 UTC 2019


On 6/5/19 7:30 PM, Xuelei Fan wrote:
> On 6/5/2019 7:21 PM, Anthony Scarpino wrote:
>>
>>> On Jun 5, 2019, at 5:37 PM, Xuelei Fan <xuelei.fan at oracle.com> wrote:
>>>
>>>> On 6/5/2019 4:57 PM, Jamil Nimeh wrote:
>>>> I think what it's saying is that what was explicitly called out in 
>>>> 4507 (where there is both the extension_data length bytes AND the 
>>>> opaque vector length) is not how deployed implementations did it. It 
>>>> implies that deployed implementations do what you laid out below 
>>>> where you just have 2 bytes of ID and 2 bytes of length.  And I 
>>>> believe that is compatible with what 5077 specifies.
>>> Hm, I agreed with you.
>>>
>>>> So the potential problem is if one endpoint or the other happens to 
>>>> implement 4507 to the letter, extra length bytes and all.  But the 
>>>> authors of 5077 say that no known implementations do this.  That's 
>>>> good for us I think, because in the two-ish years between 4507 and 
>>>> 5077 nobody did straight 4507, or they maybe did and fixed it by the 
>>>> time 5077 came around.
>>> I may view it differently.
>>>
>>> If an implementation encoded per the format:
>>>          00 23      Extension type 35
>>>          00 02      Length of extension contents
>>>          00 00      Length of ticket
>>>
>>> Just as your analysis previous, a RFC 5077 server will just ignore 
>>> the extension.  No real hurt actually.
>>>
>>> But if an implementation encoded empty SessionTicket extension per 
>>> the format (the known implementation):
>>>          00 23      Extension type 35
>>>          00 00      Length of extension contents
>>>
>>> The server could read it as RFC 5077, and use stateless 
>>> implementation. When the ServerHello extension sent back.  No matter 
>>> the RFC 4057 client accept it or not, there are interop issues.
>>>
>>> If the client does not accept it (unlikely), the connection cannot be 
>>> established.
>>>
>>> If the client accept it, the resumption session will use the 
>>> negotiated ticket, and then non-empty SessionTicket extension is 
>>> encoded as:
>>>         00 23          Ticket Extension type 35
>>>         01 02          Length of extension contents
>>>         01 00          Length of ticket
>>>         FF FF .. ..    Actual ticket
>>>
>>> The server would have to handle it (RFC 4507 format) if it want the 
>>> session resumption works.  Here come the interop issues.
>>>
>>
>> That is true, but i believe it is extremely unlikely that the length 
>> would not be in the ST empty extension, but the length would be in the 
>> ST resumption extension.
>>
> I did not get the point.
> 

The below two messages I believe are even less likely to occur.  4 byte 
ST message ([Ext Type, Ext Len]) with a 6 byte NST message ([Ext Type, 
Ext Len, Ticket Len] + Actual ticket) would mean the implementation was 
coded up correctly for the ST and incorrectly the NST.

> If I read the appendix A of RFC 5077 correctly, the initial handshake 
> uses (for known implementation, which is the ambiguous part of RFC 4507):
>          00 23      Extension type 35
>          00 00      Length of extension contents

Yes, this is 5077, and if 4507 was properly implemented if I understand 
the appendix right.  But 4507 may also include the length of the ticket 
as well as the length of the extension, like you mentioned in the early 
message.

> And session resumption uses (which is not ambiguous for RFC 4507):
>          00 23          Ticket Extension type 35
>          01 02          Length of extension contents
>          01 00          Length of ticket
>          FF FF .. ..    Actual ticket
> 
> So it is the known format/behavior if RFC 5077 is right.

This is not a valid ticket for 5077, this is the confusion of 4507.  It 
cannot be interpreted as 5077 because the ticket length will leak into 
the actual ticket and corrupt the crypto.  When the crypto fails the 
code will not proceed with resumption, going into full handshake.

Tony



More information about the security-dev mailing list