Ballot for draft-ietf-ntp-interleaved-modes
Discuss
Yes
No Objection
Abstain
No Record
Ballot deferred by Erik Kline on 2021-06-29.
Summary: Has a DISCUSS. Needs 6 more YES or NO OBJECTION positions to pass.
Hi, Disclaimer, I don't know NTP. Thanks for this document, and whilst I agree with Eric that the mechanism is clever, I am less convinced that it is wise. Specifically, I have a deep concern with repurposing fields to have a different meaning with no indication other than heuristics on the field to deduce their true meaning. It feels to me that this pseudo-extension will operationally make NTP harder to manage and to debug issues. I note that Daniel Franke suggested that this extra information be carried in extension fields, but the authors are concerned with the increase in packet size causing problems. I didn't really understand the explanation as to why this would be a problem, in that it is comparing the length between basic and extended packets, but if the extension was negotiated then could all packets use the extension fields and be of the same length? Or is it simply the increase in packet length that is an issue? Alternatively, would it at least be possible to use an extension field to flag that the fields now have a different meaning? Would that allow receivers to discard the packets with an "unknown extension" warning rather than a "the peer seems to be sending me garbage" error. Regards, Rob
Note, it looks like the wrong shepherd writeup has been uploaded on the datatracker page.
I support Warren's DISCUSS on this. Based on the outcome of the discussion, I may change my ballot position to an ABSTAIN. Section 1. , paragraph 15, comment: > An explicit negotiation would require a new extension field, > which would not work well with implementations that do not respond to > requests with unknown extension fields. Aren't such implementations in violation of the NTP specification? If so, shouldn't they be fixed instead of jumping through hoops here to avoid the need for negotiation? Especially since at some point, there will likely be the need for negotiation for some other NTP extension. Better bite the bullet now? ------------------------------------------------------------------------------- All comments below are about very minor potential issues that you may choose to address in some way - or ignore - as you see fit. Some were flagged by automated tools (via https://github.com/larseggert/ietf-reviewtool), so there will likely be some false positives. There is no need to let me know what you did with these suggestions. Section 1. , paragraph 11, nit: - packet that strictly follows RFC 5905, i.e. it contains a transmit - ^^^ + packet that strictly follows RFC 5905, i.e., contains a transmit + ^ Document references draft-ietf-ntp-port-randomization-06, but -08 is the latest available revision. These URLs in the document can probably be converted to HTTPS: * http://www.ntp.org * http://eprint.iacr.org/2016/1006
Thank you for the work put into this document. I really like the idea behind this I-D: simple and smart ;-) Please find below some non-blocking COMMENT points. I hope that this helps to improve the document, Regards, -éric -- Section 2 -- " The server MAY separate the timestamps by IP addresses, but it SHOULD NOT separate them by port numbers, i.e. clients are allowed to change their source port between requests." With draft-ietf-ntp-port-randomization in mind, please change the "clients are allowed" into "clients are recommended to" " Both servers and clients that support the interleaved mode MUST NOT send a packet that has a transmit timestamp equal to the receive timestamp" Will it always be possible to comply with the above "MUST NOT" ?
Updating my previous DISCUSS to ABSTAIN. It still feels like the document is doing something "hacky" because implementations don't really deal with extensions. I understand that this is a pragmatic solution (and a really clever hack!), but it feels like it falls into the "so sharp you'll cut yourself" type territory. The reason that I'm removing my DISCUSS is that Miroslav clarified (https://mailarchive.ietf.org/arch/msg/ntp/dzZ6W5oPaFS1lMCtNdFgWj8FAPw/) that this has been extensively tested in the real world, and works: "Yes, it has, quite extensively. There is a large number of public NTP servers that have the server support enabled. I have also captured and analyzed terabytes of NTP traffic on several public servers in different regions to confirm that it doesn't break any existing implementations."
[no record]
While this is an interesting approach, and a very clever technique to add new functionality in the face of perceived constraints, it's not clear to me that the perceived constraints are indeed constraints in reality -- this possible mismatch between perceived constraints and actual constraints seems to be at the core of Warren and Rob's discuss points, so I will not belabor it further here. Furthermore, the overall quality of the document in terms of describing the protocol does not seem to be at the level that I have come to expect from proposed standards. In particular, if I tried to implement this protocol, I think I would find myself needing to make guesses or choose among multiple possible interpretations of the text in many places. Accordingly, I can't support publishing this document as a proposed standard in its current form, so I'm balloting Abstain. It would certainly be possible to improve the document into a form that I can support, but since I don't have a specific list of actionable changes that would be needed to do so, I have to ballot Abstain rather than Discuss. The discussion of "user space"/"kernel", "system call", and the like seems to implicitly assume a certain architecture and may not be applicable to fully all devices speaking NTP. But these are certainly common architectures and abstractions, and I don't expect that using this framing for the discussion will hamper readability. There seem to be some scenarios where packets can be sent in both basic mode and interleaved mode within the same association, and it cannot always be predicted whether a response or "next message" will be in interleaved mode or not. It seems like this could present significant implementation complexity in terms of deciding whether or not to process a packet "now" as a basic-mode packet or wait for a follow-up that includes the more-accurate interleaved-mode timestamp, or some more complicated combination of the two. Is there any implementation guidance that we can give about how to process packets when there may or may not be a later follow-up with a correction to it? Section 1 Requests and responses cannot always be formed in interleaved mode. Servers, clients, and peers are required to support both interleaved and basic modes. I'm not sure I understand the intended statement of requirement here. Are we proposing (by virtue of Updates: 5905) that all NTP implementations are required to support interleaved mode? Or just that, in order to use interleaved mode, all parties are required to have support for it? Section 2 Breaking this up into subsections might help readability. A client request in the basic mode has an origin timestamp equal to the transmit timestamp from the previous server response, or is zero. A server response in the basic mode has an origin timestamp equal to the transmit timestamp from the client's request. The transmit timestamps correspond to the packets in which they are included. Since we use the receive timestamp from the client's request in some of our later discussion, I would strongly suggest including the receive timestamp in the description of basic mode here (and interleaved mode in the subsequent paragraph). A client request in the interleaved mode has an origin timestamp equal to the receive timestamp from the previous server response. A server response in the interleaved mode has an origin timestamp equal to the receive timestamp from the client's request. The transmit timestamps correspond to the previous packets that were sent to the server or client. Please provide a lot more precision about what "transmit timestamps correspond to the previous packets" means -- I might guess that it's just (client, server) using the same transmit timestamp used by the (client, server) to generate the initial exchange that preceded interleaved mode, but I also might guess a lot of other things. The transmit and receive timestamps in server responses need to be unique to prevent two different clients from sending requests with the same origin timestamp and the server responding in the interleaved mode with an incorrect transmit timestamp. If the IIUC (having read the rest of the document), the requirement here is that if we take the union of all transmit timestamps and all receive timestamps generated by the server, there must be no duplicates. This text as written did not lead me to that conclusion; I had initially assumed that it only meant "for each response packet generated, do not generate x.rec == x.xmt", which is a much weaker condition (and very hard to achieve accidentally!). I strongly suggest rewording to improve clarity. timestamps are not guaranteed to be monotonically increasing, the server SHOULD check that the transmit and receive timestamp is not already saved as a receive timestamp of a previous request (from the same IP address if the server separates timestamps by addresses), and generate a new timestamp if necessary. It would be nice to have a little more exposition on whether it's only monotonicity of transmit timestamps that's important for being able to skip this check, since "the timestamps" as written could also refer to the receive timestamp given the previous discussion. Additionally, the mention of "transmit and receive timestamp is not already saved" implies that this check is only needed when the two timestamps have the same value, and I'm not entirely sure whether that's the case. A response in the interleaved mode MUST contain the transmit timestamp of the response which contained the receive timestamp matching the origin timestamp from the request. [...] "contain" doesn't say much about containing *where*; I suggest being very clear that it contains in the transmit timestamp field the same transmit timestamp used in the previous response. The first request from a client is always in the basic mode and so is the server response. It has a zero origin timestamp and zero receive timestamp. Only when the client receives a valid response from the server, it will be able to send a request in the interleaved mode. While this is true of the first request ever, it's not quite true for the first request of a given exchange, since RFC 5905 allows the client to send the transmit timestamp from a previous server response as the origin timestamp. We do mention at the end of the section that draft-ietf-ntp-data-minimization recommends sending zero as the origin timestamp, but that's of course not something that can be strongly relied upon. I'd actually suggest just noting here that the first request has to be detected to be in basic mode, and forward-reference a dedicated subsection at the end of the section that talks about how to identify such requests. When the client receives a response from the server, it performs the tests described in RFC 5905. Two of the tests are modified for the interleaved mode: Indicating more precisely exactly which tests are modified (e.g., that these are the numbered tests from figure 22 of RFC 5905) could be useful. 1. The check for duplicate packets SHOULD compare both receive and transmit timestamps in order to not drop a valid response in the interleaved mode if it follows a response in the basic mode and they contain the same transmit timestamp. 2. The check for bogus packets SHOULD compare the origin timestamp with both transmit and receive timestamps from the request. If the origin timestamp is equal to the transmit timestamp, the response is in the basic mode. If the origin timestamp is equal to the receive timestamp, the response is in the interleaved mode. If I understand correctly, ignoring either of these SHOULDs would result in completely failing to use interleaved mode. Does that mean that they're MUSTs? A check for a non-zero origin timestamp works with clients that implement NTP data minimization [I-D.ietf-ntp-data-minimization]. To detect requests in the basic mode from clients that do not implement the data minimization, the server can encode in low-order bits of the receive and transmit timestamps below precision of the clock a bit indicating whether the timestamp is a receive timestamp. If the server receives a request with a non-zero origin timestamp which does not indicate it is a receive timestamp of the server, the request is in the basic mode and it is not necessary to save the new receive and transmit timestamp. In the vein of my earlier comment, I'd suggest rewording this significantly and making it a dedicated subsection on detecting if a request is in basic or interleaved mode. That might look something like this: % As part of request processing, the server must determine whether a % given request is in basic or interleaved mode (and thus whether or not % to respond in basic or interleaved mode). A request with a zero % origin timestamp is unambiguously in basic mode, but RFC 5905 allows a % client to send a request with a non-zero origin timestamp copied from % the transmit timestamp of a previous response from that server. While % [I-D.ietf-ntp-data-minimization] recommends always using zero for the % request's origin timestamp, that is not a behavior that the server can % rely upon, and so an additional mechanism is needed in order to detect % whether a request with non-zero origin timestamp is in basic mode. % While having the server store all the transmit timestamps it has % previously used (potentially scoped to just this client), combined % with a requirement to maintain uniqueness across all of the transmit % and receive timestamps the server generates, would perform this % function, it would require an unfeasible amount of resources and % degrade the quality of time synchronization. An alternate approach is % to use a low-order bit in the timestamp field, below the precision of % the server's clock, to indicate whether a timestamp is sent as a % transmit timestamp or a receive timestamp. When processing requests % with non-zero origin timestamps, that bit can then be used to % determine whether the request was in basic mode (transmit timestamp) % or interleaved mode (receive timestamp). Section 3 The interleaved symmetric mode uses the same principles as the interleaved client/server mode. A packet in the interleaved symmetric mode has a transmit timestamp which corresponds to the previous packet sent to the peer [...] Please apply the same change regarding "corresponds to" that was made in §2. In order to prevent the peer from matching the transmit timestamp with an incorrect packet when the peers' transmissions do not alternate (e.g. they use different polling intervals) and a previous packet was lost, the use of the interleaved mode in symmetric associations requires additional restrictions. Though the specific "restrictions" are enumerated as specific conditions below (scare quotes since they are only "SHOULD"-level requirements), the subsequent discussion suggests that in practice there are also implications on the relationship between the polling intervals of the two peers. Should we say something here about how the polling intervals should be within a factor of (1.5? 2?) of each other in order for interleaved mode to be feasible? A peer A SHOULD send a peer B a packet in the interleaved mode only when all of the following conditions are met: What happens if I violate this SHOULD? third packet sent by the peer A is in the interleaved mode. The second packet sent by the peer B is in the interleaved mode, but the following packets sent by the peer are in the basic mode, because multiple responses are sent per request. Please clarify whether the final "the peer" is peer A or peer B (or is meant to be "the peers" plural). The peers SHOULD compute the offset and delay using one of the two sets of timestamps specified in the client/server section. They MAY switch between them to minimize the interval between T1 and T4 in order to reduce the error in the measured delay. One of the sets of timestamps doesn't use T1, so I'm not sure what is supposed to be minimized here. Section 4 If the difference is larger than a specified maximum (e.g. 1 second), the packet SHOULD NOT be used for synchronization. Not used at all, or used only in basic mode? Section 7 Clients using the interleaved mode SHOULD randomize all bits of both receive and transmit timestamps, as recommended for the transmit timestamp in the NTP client data minimization [I-D.ietf-ntp-data-minimization], to make it more difficult for off- path attackers to guess the origin timestamp. [...] I would suggest going into a little more detail on the scope of consequences if an off-path attacker does successfully guess the origin timestamp. Protecting symmetric associations in the interleaved mode against replay attacks is even more difficult than in the basic mode. The NTP state needs to be protected not only between the reception and transmission in order to send the peer a packet with a valid origin timestamp, but all the time to not lose the timestamps which will be needed to complete a measurement when the following packet in the interleaved mode is received. Is there some existing guidance on how to protect symmetric associations that we can refer to (and would be effective under these constraints)? NITS Section 1 This document describes an interleaved client/server, interleaved symmetric, and interleaved broadcast mode. In these modes, the server sends a single packet, which contains a transmit timestamp corresponding to the previous packet that was sent to the client or peer. [...] The "sends a single packet" phrasing is a little weird, since we have a four-packet architecture and the comparison we're making is that any given request gets only a single response, not that there is only one packet needed overall. Section 2 The client SHOULD NOT update its NTP state when an invalid response is received to not lose the timestamps which will be needed to complete a measurement when the subsequent response in the interleaved mode is received. I suggest a comma after "invalid response is received".