RFC 7283

Handling Unknown DHCPv6 Messages

πŸ“… published July 2014, from ietf

Abstract πŸŽ€

okay bestie, so the title block says it all. This is RFC 7283, "Handling Unknown DHCPv6 Messages," written by Y. Cui (Yong Cui, Tsinghua University), Q. Sun (Qi Sun, Tsinghua University), and T. Lemon (Ted Lemon, Nominum, Inc.) 🧚. It's a Standards Track doc, dated July 2014, with ISSN 2070-1721, and it updates RFC 3315 ✨. It doesn't obsolete anything. The big picture is that DHCPv6 is literally not specific about what to do when it gets a message with a type it doesn't recognise πŸ’€. This doc fixes that for servers, clients, and relay agents, and it also gives advice to people writing future docs that define new messages going from DHCP servers to relay agents πŸ’–.

Status of This Memo 🌸

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7283.

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.

Table of Contents πŸ“‹

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
2.  Requirements Language . . . . . . . . . . . . . . . . . . . .   3
3.  Problem Statement . . . . . . . . . . . . . . . . . . . . . .   3
4.  Relay Agent Behavior Update . . . . . . . . . . . . . . . . .   3
  4.1.  A Valid Message for Constructing a New Relay-forward
        Message . . . . . . . . . . . . . . . . . . . . . . . . .   4
  4.2.  Relaying a Message toward the Server  . . . . . . . . . .   5
  4.3.  Relaying a Message toward the Client  . . . . . . . . . .   5
5.  Client and Server Behavior Update . . . . . . . . . . . . . .   5
6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
7.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .   6
8.  Normative References  . . . . . . . . . . . . . . . . . . . .   6

1. Introduction πŸ¦‹

DHCPv6 [RFC3315] gives us a framework for handing IPv6 configuration info to hosts on a TCP/IP network. But [RFC3315] is not specific about how to deal with messages that have unrecognised types 😭. This doc goes over the problems that come up when you receive DHCPv6 messages with unknown types, and it defines how a DHCPv6 server, client, or relay agent should behave when it runs into one. Main character behaviour, honestly πŸ‘‘.

2. Requirements Language πŸ’…

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

3. Problem Statement 🌈

So when a relay agent gets a message, it sends that message toward either the server or the client πŸŽ€. It decides which direction to go based on the message type. Since RFC 3315 came out, new message types have been defined, and more may be defined later πŸ”₯. RFC 3315 doesn't say what a DHCP agent should do when it doesn't recognise the type of message it got πŸ’€. That can lead to relay agents dropping these messages when they shouldn't, and other DHCP agents processing them when they shouldn't either. Not ideal, bestie.

On top of that, RFC 3315 has no specific requirement for how a client or server deals with unknown messages πŸ™ˆ.

Also, it's expected that most future DHCPv6 messages won't be used to talk directly to relay agents, though they may still need to be relayed by relay agents 🧚.

4. Relay Agent Behavior Update πŸ’–

Relay agents relay messages toward servers and clients depending on the message type. The Relay-reply message goes toward the client. The Relay-forward message and every other type of message go toward the server ✨.

We say "toward the client" and "toward the server" because relay agents can be chained together, so a relay message might pass through several relay agents on the way to its destination πŸ¦‹. Relay-reply messages specify a destination address, and the relay agent pulls out the encapsulated message and sends it to that address. Any message other than a Relay-reply doesn't have a specified destination, so it follows the default forwarding path configured on the relay agent, which is always toward the server 🌸.

The whole reason relay agents have to relay unknown messages is so that when legit new messages get defined in the protocol, relay agents (even ones made before those messages existed) will, by default, succeed in relaying them 🫢. That's the goal, and it's giving real protocol-design energy πŸ”₯.

4.1. A Valid Message for Constructing a New Relay-forward Message πŸ’…

Section 20.1 of [RFC3315] states that:

When a relay agent receives a valid message to be relayed, it
constructs a new Relay-forward message.

It doesn't define which types of messages are valid for constructing Relay-forward messages. This doc spells that out as follows:

The message is valid for constructing a new Relay-forward message:

(a)  if the message is a Relay-forward message, or

(b)  if the relay agent recognizes the message type and is not the
     intended target, or

(c)  if the relay agent does not recognize the message type.

New DHCP message types might be defined in the future that get sent, unsolicited, to relay agents πŸ“. Relay agents that don't implement those messages won't recognise them as meant for them. So a relay agent that implements this spec will forward those messages to the DHCP servers it's configured to relay client messages to πŸ’œ.

Right now, no such message types have been specified 🌸. If one gets specified later, it's possible that it would cause needless load on DHCP servers. If a future spec defines a message type like that, authors may need to think about a strategy for spotting non-conforming relays and not sending those messages to them πŸ™ˆ.

That said, since DHCP servers don't respond to unknown messages, this is unlikely to create significant load, so it's probably unnecessary 😌.

4.2. Relaying a Message toward the Server ✨

If the relay agent receives a Relay-forward message, Section 20.1.2 of [RFC3315] defines the required behavior. If the relay agent receives messages other than Relay-forward and Relay-reply, and the relay agent doesn't recognise its message type, it MUST forward them as described in Section 20.1.1 of [RFC3315] πŸš€.

4.3. Relaying a Message toward the Client πŸŽ€

If the relay agent receives a Relay-reply message, it MUST process the message as defined in Section 20.2 of [RFC3315], regardless of the type of message encapsulated in the Relay Message option πŸ‘‘.

5. Client and Server Behavior Update πŸ”₯

A client or server MUST silently discard any received DHCPv6 message with an unknown message type πŸ™…β€β™€οΈ.

6. Security Considerations πŸ’€

Okay bestie, this section is serious, so read it carefully 🫣.

This document creates no new security issues that aren't already present in RFC 3315 ✨. By explicitly documenting the correct handling of unknown messages, this document, if implemented, reduces any security exposure that might come from incorrect handling of unknown messages πŸ›‘οΈ. The following issues are already present with Section 23 of [RFC3315], but we talk about them in detail here as guidance for implementors πŸ“£.

Because the relay agent forwards all unknown types of DHCPv6 messages, a malicious attacker can interfere with the relaying function by building fake DHCPv6 messages with an arbitrary type code 😱. The same problem can happen in current DHCPv4 and DHCPv6 practice, where the attacker builds a fake DHCP message with a known type code πŸ™ˆ.

Clients and servers that implement this spec will discard unknown DHCPv6 messages. Since RFC 3315 didn't specify relay agent, client, or server behaviour when unknown messages show up, it's possible that some servers or clients that haven't been updated to conform to this spec will become vulnerable to attacks through the relay agent because of this change πŸ’”.

For this reason, we recommend that relay agents, clients, and servers be updated to follow this new spec. However, in most deployment scenarios, it'll be way easier to attack clients directly than through a relay agent. Plus, attacks using unknown message types are already possible on the local wire 🌐.

So, in most cases, if clients aren't upgraded, there should be minimal additional risk 🫢. At sites where only servers and relay agents can be upgraded, the incremental benefit of doing so most likely outweighs any risk from vulnerable clients πŸ’….

Nothing in this update should be construed to mean that relay agents may not be administratively configurable to drop messages based on the message type, for security reasons (e.g., in a firewall) πŸ”’.

7. Contributors πŸ’œ

Many thanks to Bernie Volz, Tomek Mrugalski, Sheng Jiang, Cong Liu, and Yuchi Chen for their contributions to the document 🌟.

8. Normative References πŸ“š

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC3315]  Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C.,
           and M. Carney, "Dynamic Host Configuration Protocol for
           IPv6 (DHCPv6)", RFC 3315, July 2003.

Authors' Addresses πŸ’Œ

Yong Cui
Tsinghua University
Beijing  100084
P.R. China

Phone: +86-10-6260-3059
EMail: yong@csnet1.cs.tsinghua.edu.cn


Qi Sun
Tsinghua University
Beijing  100084
P.R. China

Phone: +86-10-6278-5822
EMail: sunqi@csnet1.cs.tsinghua.edu.cn


Ted Lemon
Nominum, Inc.
2000 Seaport Blvd
Redwood City, CA  94063
USA

Phone: +1-650-381-6000
EMail: Ted.Lemon@nominum.com

That's the whole RFC, bestie 🌈✨ Every unknown message gets silently dropped by clients and servers, relay agents forward them so future messages still get through, and it's all about keeping DHCPv6 iconic πŸ’–πŸ’…

πŸ“¦ where this page comes from