idnits 2.17.1 draft-ietf-opsec-dhcpv6-shield-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 19, 2015) is 3384 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) == Outdated reference: A later version (-01) exists of draft-gont-6man-rfc6564bis-00 == Outdated reference: A later version (-34) exists of draft-ietf-savi-dhcp-31 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 opsec F. Gont 3 Internet-Draft SI6 Networks / UTN-FRH 4 Intended status: Best Current Practice W. Liu 5 Expires: July 23, 2015 Huawei Technologies 6 G. Van de Velde 7 Cisco Systems 8 January 19, 2015 10 DHCPv6-Shield: Protecting Against Rogue DHCPv6 Servers 11 draft-ietf-opsec-dhcpv6-shield-05 13 Abstract 15 This document specifies a mechanism for protecting hosts connected to 16 a switched network against rogue DHCPv6 servers. It is based on 17 DHCPv6 packet-filtering at the layer-2 device at which the packets 18 are received. A similar mechanism has been widely deployed in IPv4 19 networks ('DHCP snooping'), and hence it is desirable that similar 20 functionality be provided for IPv6 networks. This document specifies 21 a Best Current Practice for the implementation of DHCPv6 Shield. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on July 23, 2015. 40 Copyright Notice 42 Copyright (c) 2015 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 59 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 4. DHCPv6-Shield Configuration . . . . . . . . . . . . . . . . . 4 61 5. DHCPv6-Shield Implementation Advice . . . . . . . . . . . . . 4 62 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 63 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 64 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 65 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 66 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 67 9.2. Informative References . . . . . . . . . . . . . . . . . 9 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 70 1. Introduction 72 This document specifies DHCPv6-Shield: a mechanism for protecting 73 hosts connected to a switched network against rogue DHCPv6 servers 74 [RFC3315]. The basic concept behind DHCPv6-Shield is that a layer-2 75 device filters DHCPv6 messages meant to DHCPv6 clients (henceforth 76 "DHCPv6-server messages"), according to a number of different 77 criteria. The most basic filtering criterion is that DHCPv6-server 78 messages are discarded by the layer-2 device unless they are received 79 on a specific ports of the layer-2 device. 81 Before the DCHPv6-Shield device is deployed, the administrator 82 specifies the layer-2 port(s) on which DHCPv6-server messages are to 83 be allowed. Only those ports to which a DHCPv6 server or relay is to 84 be connected should be specified as such. Once deployed, the 85 DHCPv6-Shield device inspects received packets, and allows (i.e. 86 passes) DHCPv6-server messages only if they are received on layer-2 87 ports that have been explicitly configured for such purpose. 89 DHCPv6-Shield is analogous to the RA-Guard mechanism [RFC6104] 90 [RFC6105] [RFC7113], intended for protection against rogue Router 91 Advertisement [RFC4861] messages. 93 We note that DHCPv6-Shield only mitigates only DHCPv6-based attacks 94 against hosts. Attack vectors based on other messages meant for 95 network configuration (such as ICMPv6 Router Advertisements) are not 96 addressed by DHCPv6-Shield itself. In a similar vein, 97 DHCPv6-Shielddoes not mitigate attacks against DHCPv6 servers (e.g., 98 Denial of Service). 100 2. Requirements Language 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 104 document are to be interpreted as described in RFC 2119 [RFC2119]. 106 3. Terminology 108 DHCPv6-Shield: 110 the set of filtering rules specified in this document, meant to 111 mitigate attacks that employ DHCPv6-server packets. 113 DHCPv6-Shield device: 115 A layer-2 device (typically a layer-2 switch) that enforces the 116 filtering policy specified in this document. 118 For the purposes of this document, the terms Extension Header, Header 119 Chain, First Fragment, and Upper-layer Header are used as specified 120 in [RFC7112]: 122 IPv6 Extension Header: 124 Extension Headers are defined in Section 4 of [RFC2460]. As a 125 result of [RFC7045], [IANA-PROTO] provides a list of assigned 126 Internet Protocol Numbers and designates which of those protocol 127 numbers also represent extension headers. 129 First Fragment: 131 An IPv6 fragment with fragment offset equal to 0. 133 IPv6 Header Chain: 135 The header chain contains an initial IPv6 header, zero or more 136 IPv6 extension headers, and optionally, a single upper-layer 137 header. If an upper-layer header is present, it terminates the 138 header chain; otherwise the "No Next Header" value (Next Header = 139 59) terminates it. 141 The first member of the header chain is always an IPv6 header. 142 For a subsequent header to qualify as a member of the header 143 chain, it must be referenced by the "Next Header" field of the 144 previous member of the header chain. However, if a second IPv6 145 header appears in the header chain, as is the case when IPv6 is 146 tunneled over IPv6, the second IPv6 header is considered to be an 147 upper-layer header and terminates the header chain. Likewise, if 148 an Encapsulating Security Payload (ESP) header appears in the 149 header chain it is considered to be an upper-layer header and it 150 terminates the header chain. 152 Upper-layer Header: 154 In the general case, the upper-layer header is the first member of 155 the header chain that is neither an IPv6 header nor an IPv6 156 extension header. However, if either an ESP header, or a second 157 IPv6 header occur in the header chain, they are considered to be 158 upper layer headers and they terminate the header chain. 160 Neither the upper-layer payload, nor any protocol data following 161 the upper-layer payload, is considered to be part of the header 162 chain. In a simple example, if the upper-layer header is a TCP 163 header, the TCP payload is not part of the header chain. In a 164 more complex example, if the upper-layer header is an ESP header, 165 neither the payload data, nor any of the fields that follow the 166 payload data in the ESP header are part of the header chain. 168 4. DHCPv6-Shield Configuration 170 Before being deployed for production, the DHCPv6-Shield device MUST 171 be explicitly configured with respect to which layer-2 ports are 172 allowed to receive DHCPv6 packets destined to DHCPv6 clients (i.e. 173 DHCPv6-server messages). Only those layer-2 ports explicitly 174 configured for such purpose will be allowed to receive DHCPv6 packets 175 to DHCPv6 clients. 177 5. DHCPv6-Shield Implementation Advice 179 The following filtering rules MUST be enforced as part of a 180 DHCPv6-Shield implementation on those ports that are not allowed to 181 receive DHCPv6 packets to DHCPv6 clients: 183 1. DHCPv6-Shield MUST parse the entire IPv6 header chain present in 184 the packet, to identify whether it is a DHCPv6 packet meant for a 185 DHCPv6 client (i.e., a DHCPv6-server message). 187 RATIONALE: DHCPv6-Shield implementations MUST NOT enforce a 188 limit on the number of bytes they can inspect (starting from 189 the beginning of the IPv6 packet), since this could introduce 190 false-negatives: DHCP6-server packets received on ports not 191 allowed to receive such packets could be allowed simply 192 because the DHCPv6-Shield device does not parse the entire 193 IPv6 header chain present in the packet. 195 2. When parsing the IPv6 header chain, if the packet is a first- 196 fragment (i.e., a packet containing a Fragment Header with the 197 Fragment Offset set to 0) and it fails to contain the entire IPv6 198 header chain (i.e., all the headers starting from the IPv6 header 199 up to, and including, the upper-layer header), DHCPv6-Shield MUST 200 drop the packet, and SHOULD log the packet drop event in an 201 implementation-specific manner as a security fault. 203 RATIONALE: Packets that fail to contain the IPv6 header chain 204 could otherwise be leveraged for circumventing DHCPv6-Shield. 205 [RFC7112] specifies that the first-fragment (i.e., the 206 fragment with the Fragment Offset set to 0) MUST contain the 207 entire IPv6 header chain, and allows intermediate systems such 208 as routers to drop those packets that fail to comply with this 209 requirement. 211 NOTE: This rule should only be applied to IPv6 fragments with 212 a Fragment Offset of 0 (non-first fragments can be safely 213 passed, since they will never reassemble into a complete 214 datagram if they are part of a DHCPv6 packet meant for a 215 DHCPv6 client received on a port where such packets are not 216 allowed). 218 3. When parsing the IPv6 header chain, if the packet is identified 219 to be a DHCPv6 packet meant for a DHCPv6 client or the packet 220 contains an unrecognized Next Header value, DHCPv6-Shield MUST 221 drop the packet, and SHOULD log the packet drop event in an 222 implementation-specific manner as a security alert. 223 DHCPv6-Shield MUST provide a configuration knob that controls 224 whether packets with unrecognized Next Header values are dropped; 225 this configuration knob MUST default to "drop". 227 RATIONALE: An unrecognized Next Header value could possibly 228 identify an IPv6 Extension Header, and thus be leveraged to 229 conceal a DHCPv6-server packet (since there is no way for 230 DHCPv6-Shield to parse past unrecognized Next Header values 231 [I-D.gont-6man-rfc6564bis]). [RFC7045] requires that nodes be 232 configurable with respect to whether packets with unrecognized 233 headers are forwarded, and allows the default behavior to be 234 that such packets be dropped. 236 4. In all other cases, DHCPv6-Shield MUST pass the packet as usual. 238 NOTE: For the purpose of enforcing the DHCPv6-Shield filtering 239 policy, an ESP header [RFC4303] should be considered to be an 240 "upper-layer protocol" (that is, it should be considered the last 241 header in the IPv6 header chain). This means that packets 242 employing ESP would be passed by the DHCPv6-Shield device to the 243 intended destination. If the destination host does not have a 244 security association with the sender of the aforementioned IPv6 245 packet, the packet would be dropped. Otherwise, if the packet is 246 considered valid by the IPsec implementation at the receiving host 247 and encapsulates a DHCPv6 message, it is up to the receiving host 248 what to do with such packet. 250 The above rules require that if a packet is dropped due to this 251 filtering policy, the packet drop event be logged in an 252 implementation-specific manner as a security fault. The logging 253 mechanism SHOULD include a per -port drop counter dedicated to 254 DHCPv6-Shield packet drops. 256 In order to protect current end-node IPv6 implementations, Rule #2 257 has been defined as a default rule to drop packets that cannot be 258 positively identified as not being DHCPv6-server packets (because the 259 packet is a fragment that fails to include the entire IPv6 header 260 chain). This means that, at least in theory, DHCPv6-Shield could 261 result in false-positive blocking of some legitimate (non 262 DHCPv6-server) packets. However, as noted in [RFC7112], IPv6 packets 263 that fail to include the entire IPv6 header chain are virtually 264 impossible to police with state-less filters and firewalls, and hence 265 are unlikely to survive in real networks. [RFC7112] requires that 266 hosts employing fragmentation include the entire IPv6 header chain in 267 the first fragment (the fragment with the Fragment Offset set to 0), 268 thus eliminating the aforementioned false positives. 270 The aforementioned filtering rules implicitly handle the case of 271 fragmented packets: if the DHCPv6-Shield device fails to identify the 272 upper-layer protocol as a result of the use of fragmentation, the 273 corresponding packets would be dropped. 275 Finally, we note that IPv6 implementations that allow overlapping 276 fragments (i.e. that do not comply with [RFC5722]) might still be 277 subject of DHCPv6-based attacks. However, a recent assessment of 278 IPv6 implementations [SI6-FRAG] with respect to their fragment 279 reassembly policy seems to indicate that most current implementations 280 comply with [RFC5722]. 282 6. IANA Considerations 284 This document has no actions for IANA. 286 7. Security Considerations 288 The mechanism specified in this document can be used to mitigate 289 DHCPv6-based attacks against hosts. Attack vectors based on other 290 messages meant for network configuration (such as ICMPv6 Router 291 Advertisements) are out of the scope of this document. Additionally, 292 the mechanism specified in this document does not mitigate attacks 293 against DHCPv6 servers (e.g., Denial of Service). 295 If deployed in layer-2 domain with several cascading switches, there 296 will be an ingress port on the host's local switch which will need to 297 be enabled for receiving DHCPv6-server messages. However, this local 298 switch will be reliant on the upstream devices to have filtered out 299 rogue DHCPv6-server messages, as the local switch has no way of 300 determining which upstream DHCP-server messages are valid. 301 Therefore, in order to be effective DHCPv6 Shield should be deployed 302 and enabled on all layer-2 switches of a given layer-2 domain. 304 As noted in Section 5, IPv6 implementations that allow overlapping 305 fragments (i.e. that do not comply with [RFC5722]) might still be 306 subject of DHCPv6-based attacks. However, most current 307 implementations seem to comply with [RFC5722], and hence forbid IPv6 308 overlapping fragments. 310 We note that if an attacker sends a fragmented DHCPv6 packet on a 311 port not allowed to receive such packets, the first-fragment would be 312 dropped, and the rest of the fragments would be passed. This means 313 that the victim node would tie memory buffers for the aforementioned 314 fragments, which would never reassemble into a complete datagram. If 315 a large number of such packets were sent by an attacker, and the 316 victim node failed to implement proper resource management for the 317 fragment reassembly buffer, this could lead to a Denial of Service 318 (DoS). However, this does not really introduce a new attack vector, 319 since an attacker could always perform the same attack by sending 320 forged fragmented datagram in which at least one of the fragments is 321 missing. [CPNI-IPv6] discusses some resource management strategies 322 that could be implemented for the fragment reassembly buffer. 324 Additionally, we note that the security of a site employing DHCPv6 325 Shield could be further improved by deploying [I-D.ietf-savi-dhcp], 326 to mitigate IPv6 address spoofing attacks. 328 Finally, we note that other mechanisms for mitigating attacks based 329 on DHCPv6-server messages are available that have different 330 deployment considerations. For example, [I-D.ietf-dhc-secure-dhcpv6] 331 allows for authentication of DHCPv6-server packets if the IPv6 332 addresses of the DHCPv6 servers can be pre-configured at the client 333 nodes. 335 8. Acknowledgements 337 The authors would like to thank (in alphabetical order) Ben Campbell, 338 Jean-Michel Combes, Sheng Jiang, Juergen Schoenwaelder, Carsten 339 Schmoll, Robert Sleigh, Donald Smith, Mark Smith, Hannes Tschofenig, 340 Eric Vyncke, and Qin Wu, for providing valuable comments on earlier 341 versions of this document. 343 Part of Section 3 of this document was borrowed from [RFC7112], 344 authored by Fernando Gont, Vishwas Manral, and Ron Bonica. 346 This document is heavily based on the document [RFC7113] authored by 347 Fernando Gont. Thus, the authors would like to thank Ran Atkinson, 348 Karl Auer, Robert Downie, Washam Fan, David Farmer, Mike Heard, Marc 349 Heuse, Nick Hilliard, Ray Hunter, Joel Jaeggli, Simon Perreault, 350 Arturo Servin, Gunter van de Velde, James Woodyatt, and Bjoern A. 351 Zeeb, for providing valuable comments on [RFC7113], on which this 352 document is based. 354 9. References 356 9.1. Normative References 358 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 359 Requirement Levels", BCP 14, RFC 2119, March 1997. 361 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 362 (IPv6) Specification", RFC 2460, December 1998. 364 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 365 and M. Carney, "Dynamic Host Configuration Protocol for 366 IPv6 (DHCPv6)", RFC 3315, July 2003. 368 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 369 4303, December 2005. 371 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 372 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 373 September 2007. 375 [RFC5722] Krishnan, S., "Handling of Overlapping IPv6 Fragments", 376 RFC 5722, December 2009. 378 [RFC7112] Gont, F., Manral, V., and R. Bonica, "Implications of 379 Oversized IPv6 Header Chains", RFC 7112, January 2014. 381 [RFC7045] Carpenter, B. and S. Jiang, "Transmission and Processing 382 of IPv6 Extension Headers", RFC 7045, December 2013. 384 9.2. Informative References 386 [I-D.ietf-dhc-secure-dhcpv6] 387 Jiang, S. and S. Shen, "Secure DHCPv6 Using CGAs", draft- 388 ietf-dhc-secure-dhcpv6-07 (work in progress), September 389 2012. 391 [I-D.gont-6man-rfc6564bis] 392 Gont, F., Will, W., Krishnan, S., and H. Pfeifer, "IPv6 393 Universal Extension Header", draft-gont-6man-rfc6564bis-00 394 (work in progress), April 2014. 396 [RFC6104] Chown, T. and S. Venaas, "Rogue IPv6 Router Advertisement 397 Problem Statement", RFC 6104, February 2011. 399 [RFC6105] Levy-Abegnoli, E., Van de Velde, G., Popoviciu, C., and J. 400 Mohacsi, "IPv6 Router Advertisement Guard", RFC 6105, 401 February 2011. 403 [RFC7113] Gont, F., "Implementation Advice for IPv6 Router 404 Advertisement Guard (RA-Guard)", RFC 7113, February 2014. 406 [IANA-PROTO] 407 Internet Assigned Numbers Authority, "Protocol Numbers", 408 February 2013, . 411 [SI6-FRAG] 412 SI6 Networks, "IPv6 NIDS evasion and improvements in IPv6 413 fragmentation/reassembly", 2012, 414 . 417 [I-D.ietf-savi-dhcp] 418 Bi, J., Wu, J., Yao, G., and F. Baker, "SAVI Solution for 419 DHCP", draft-ietf-savi-dhcp-31 (work in progress), January 420 2015. 422 [CPNI-IPv6] 423 Gont, F., "Security Assessment of the Internet Protocol 424 version 6 (IPv6)", UK Centre for the Protection of 425 National Infrastructure, (available on request). 427 Authors' Addresses 428 Fernando Gont 429 SI6 Networks / UTN-FRH 430 Evaristo Carriego 2644 431 Haedo, Provincia de Buenos Aires 1706 432 Argentina 434 Phone: +54 11 4650 8472 435 Email: fgont@si6networks.com 436 URI: http://www.si6networks.com 438 Will Liu 439 Huawei Technologies 440 Bantian, Longgang District 441 Shenzhen 518129 442 P.R. China 444 Email: liushucheng@huawei.com 446 Gunter Van de Velde 447 Cisco Systems 448 De Kleetlaan 6a 449 Diegem 1831 450 Belgium 452 Phone: +32 2704 5473 453 Email: gunter@cisco.com