idnits 2.17.1 draft-ietf-opsec-dhcpv6-shield-08.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 (July 6, 2015) is 3189 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 Summary: 2 errors (**), 0 flaws (~~), 2 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: January 7, 2016 Huawei Technologies 6 G. Van de Velde 7 Alcatel-Lucent 8 July 6, 2015 10 DHCPv6-Shield: Protecting Against Rogue DHCPv6 Servers 11 draft-ietf-opsec-dhcpv6-shield-08 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 January 7, 2016. 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 Requirements . . . . . . . . . . 4 62 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 63 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 64 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 65 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 66 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 67 9.2. Informative References . . . . . . . . . . . . . . . . . 9 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 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 intended for DHCPv6 clients 76 (henceforth "DHCPv6-server messages"), according to a number of 77 different criteria. The most basic filtering criterion is that 78 DHCPv6-server messages are discarded by the layer-2 device unless 79 they are received on specific ports of the layer-2 device. 81 Before the DHCPv6-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 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 is 171 explicitly configured with respect to which layer-2 ports are allowed 172 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 Requirements 179 The following are the filtering rules that are 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 implementations MUST parse the entire IPv6 header 184 chain present in the packet, to identify whether it is a DHCPv6 185 packet meant for a 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 ought to log the packet drop event in an 201 implementation-specific manner as a security fault. 203 RATIONALE: Packets that fail to contain the entire IPv6 header 204 chain could otherwise be leveraged for circumventing 205 DHCPv6-Shield. [RFC7112] requires that the first-fragment 206 (i.e., the fragment with the Fragment Offset set to 0) 207 contains the entire IPv6 header chain, and allows intermediate 208 systems such as routers to drop those packets that fail to 209 comply with this 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. DHCPv6-Shield MUST provide a configuration knob that controls 219 whether packets with unrecognized Next Header values are dropped; 220 this configuration knob MUST default to "drop". When parsing the 221 IPv6 header chain, if the packet contains an unrecognized Next 222 Header value and the configuration knob is configured to "drop", 223 DHCPv6-Shield MUST drop the packet, and ought to log the packet 224 drop event in an implementation-specific manner as a security 225 fault. 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. When parsing the IPv6 header chain, if the packet is identified 237 to be a DHCPv6 packet meant for a DHCPv6 client, DHCPv6-Shield 238 MUST drop the packet, and SHOULD log the packet drop event in an 239 implementation-specific manner as a security alert. 241 RATIONALE: Ultimately, the goal of DHCPv6-Shield is drop 242 DHCPv6 packets destined to DHCPv6 clients (i.e. DHCPv6-server 243 messages) that are received on ports that have not been 244 explicitly configured to allow the receipt of such packets. 246 5. In all other cases, DHCPv6-Shield MUST pass the packet as usual. 248 NOTE: For the purpose of enforcing the DHCPv6-Shield filtering 249 policy, an ESP header [RFC4303] should be considered to be an 250 "upper-layer protocol" (that is, it should be considered the last 251 header in the IPv6 header chain). This means that packets 252 employing ESP would be passed by the DHCPv6-Shield device to the 253 intended destination. If the destination host does not have a 254 security association with the sender of the aforementioned IPv6 255 packet, the packet would be dropped. Otherwise, if the packet is 256 considered valid by the IPsec implementation at the receiving host 257 and encapsulates a DHCPv6 message, it is up to the receiving host 258 what to do with such packet. 260 The above indicates that if a packet is dropped due to this filtering 261 policy, the packet drop event be logged in an implementation-specific 262 manner as a security fault. It is useful for the logging mechanism 263 to include a per-port drop counter dedicated to DHCPv6-Shield packet 264 drops. 266 In order to protect current end-node IPv6 implementations, Rule #2 267 has been defined as a default rule to drop packets that cannot be 268 positively identified as not being DHCPv6-server packets (because the 269 packet is a fragment that fails to include the entire IPv6 header 270 chain). This means that, at least in theory, DHCPv6-Shield could 271 result in false-positive blocking of some legitimate (non 272 DHCPv6-server) packets. However, as noted in [RFC7112], IPv6 packets 273 that fail to include the entire IPv6 header chain are virtually 274 impossible to police with state-less filters and firewalls, and hence 275 are unlikely to survive in real networks. [RFC7112] requires that 276 hosts employing fragmentation include the entire IPv6 header chain in 277 the first fragment (the fragment with the Fragment Offset set to 0), 278 thus eliminating the aforementioned false positives. 280 The aforementioned filtering rules implicitly handle the case of 281 fragmented packets: if the DHCPv6-Shield device fails to identify the 282 upper-layer protocol as a result of the use of fragmentation, the 283 corresponding packets would be dropped. 285 Finally, we note that IPv6 implementations that allow overlapping 286 fragments (i.e. that do not comply with [RFC5722]) might still be 287 subject of DHCPv6-based attacks. However, a recent assessment of 288 IPv6 implementations [SI6-FRAG] with respect to their fragment 289 reassembly policy seems to indicate that most current implementations 290 comply with [RFC5722]. 292 6. IANA Considerations 294 This document has no actions for IANA. 296 7. Security Considerations 298 The recommendations in this document represent the ideal behavior of 299 a DHCPv6 shield device. However, in order to implement DHCPv6 shield 300 on the fast path, it may be necessary to limit the depth into the 301 packet that can be scanned before giving up. In circumstances where 302 there is such a limitation, it is recommended that implementations 303 drop packets after attempting to find a protocol header up to that 304 limit, whatever it is. Ideally, such devices should be configurable 305 with a list of protocol header identifiers so that if new transport 306 protocols are standardized after the device is released, they can be 307 added to the list of protocol header types that the device 308 recognizes. Since any protocol header that is not a UDP header would 309 be passed by the DHCPv6 shield algorithm, this would allow such 310 devices to avoid blocking the use of new transport protocols. When 311 an implementation must stop searching for recognizable header types 312 in a packet due to such limitations, whether the device passes or 313 drop that packet SHOULD be configurable. 315 The mechanism specified in this document can be used to mitigate 316 DHCPv6-based attacks against hosts. Attack vectors based on other 317 messages meant for network configuration (such as ICMPv6 Router 318 Advertisements) are out of the scope of this document. Additionally, 319 the mechanism specified in this document does not mitigate attacks 320 against DHCPv6 servers (e.g., Denial of Service). 322 If deployed in layer-2 domain with several cascading switches, there 323 will be an ingress port on the host's local switch which will need to 324 be enabled for receiving DHCPv6-server messages. However, this local 325 switch will be reliant on the upstream devices to have filtered out 326 rogue DHCPv6-server messages, as the local switch has no way of 327 determining which upstream DHCP-server messages are valid. 328 Therefore, in order to be effective DHCPv6 Shield should be deployed 329 and enabled on all layer-2 switches of a given layer-2 domain. 331 As noted in Section 5, IPv6 implementations that allow overlapping 332 fragments (i.e. that do not comply with [RFC5722]) might still be 333 subject of DHCPv6-based attacks. However, most current 334 implementations seem to comply with [RFC5722], and hence forbid IPv6 335 overlapping fragments. 337 We note that if an attacker sends a fragmented DHCPv6 packet on a 338 port not allowed to receive such packets, the first-fragment would be 339 dropped, and the rest of the fragments would be passed. This means 340 that the victim node would tie memory buffers for the aforementioned 341 fragments, which would never reassemble into a complete datagram. If 342 a large number of such packets were sent by an attacker, and the 343 victim node failed to implement proper resource management for the 344 fragment reassembly buffer, this could lead to a Denial of Service 345 (DoS). However, this does not really introduce a new attack vector, 346 since an attacker could always perform the same attack by sending 347 forged fragmented datagram in which at least one of the fragments is 348 missing. [CPNI-IPv6] discusses some resource management strategies 349 that could be implemented for the fragment reassembly buffer. 351 Additionally, we note that the security of a site employing DHCPv6 352 Shield could be further improved by deploying [I-D.ietf-savi-dhcp], 353 to mitigate IPv6 address spoofing attacks. 355 Finally, we note that other mechanisms for mitigating attacks based 356 on DHCPv6-server messages are available that have different 357 deployment considerations. For example, [I-D.ietf-dhc-secure-dhcpv6] 358 allows for authentication of DHCPv6-server packets if the IPv6 359 addresses of the DHCPv6 servers can be pre-configured at the client 360 nodes. 362 8. Acknowledgements 364 The authors would like to thank Mike Heard, who provided detailed 365 feedback on earlier versions of this document and helped a lot in 366 producing a technically-sound document throughout the whole 367 publication process. 369 The authors would like to thank (in alphabetical order) Ben Campbell, 370 Jean-Michel Combes, Sheng Jiang, Ted Lemon, Pete Resnick, Juergen 371 Schoenwaelder, Carsten Schmoll, Robert Sleigh, Donald Smith, Mark 372 Smith, Hannes Tschofenig, Eric Vyncke, and Qin Wu, for providing 373 valuable comments on earlier versions of this document. 375 Part of Section 3 of this document was borrowed from [RFC7112], 376 authored by Fernando Gont, Vishwas Manral, and Ron Bonica. 378 This document is heavily based on the document [RFC7113] authored by 379 Fernando Gont. Thus, the authors would like to thank Ran Atkinson, 380 Karl Auer, Robert Downie, Washam Fan, David Farmer, Mike Heard, Marc 381 Heuse, Nick Hilliard, Ray Hunter, Joel Jaeggli, Simon Perreault, 382 Arturo Servin, Gunter van de Velde, James Woodyatt, and Bjoern A. 383 Zeeb, for providing valuable comments on [RFC7113], on which this 384 document is based. 386 The authors would like to thank Joel Jaeggli for his advice and 387 guidance throughout the IETF process. 389 9. References 391 9.1. Normative References 393 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 394 Requirement Levels", BCP 14, RFC 2119, March 1997. 396 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 397 (IPv6) Specification", RFC 2460, December 1998. 399 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 400 and M. Carney, "Dynamic Host Configuration Protocol for 401 IPv6 (DHCPv6)", RFC 3315, July 2003. 403 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 404 4303, December 2005. 406 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 407 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 408 September 2007. 410 [RFC5722] Krishnan, S., "Handling of Overlapping IPv6 Fragments", 411 RFC 5722, December 2009. 413 [RFC7112] Gont, F., Manral, V., and R. Bonica, "Implications of 414 Oversized IPv6 Header Chains", RFC 7112, January 2014. 416 [RFC7045] Carpenter, B. and S. Jiang, "Transmission and Processing 417 of IPv6 Extension Headers", RFC 7045, December 2013. 419 9.2. Informative References 421 [I-D.ietf-dhc-secure-dhcpv6] 422 Jiang, S. and S. Shen, "Secure DHCPv6 Using CGAs", draft- 423 ietf-dhc-secure-dhcpv6-07 (work in progress), September 424 2012. 426 [I-D.gont-6man-rfc6564bis] 427 Gont, F., Will, W., Krishnan, S., and H. Pfeifer, "IPv6 428 Universal Extension Header", draft-gont-6man-rfc6564bis-00 429 (work in progress), April 2014. 431 [RFC6104] Chown, T. and S. Venaas, "Rogue IPv6 Router Advertisement 432 Problem Statement", RFC 6104, February 2011. 434 [RFC6105] Levy-Abegnoli, E., Van de Velde, G., Popoviciu, C., and J. 435 Mohacsi, "IPv6 Router Advertisement Guard", RFC 6105, 436 February 2011. 438 [RFC7113] Gont, F., "Implementation Advice for IPv6 Router 439 Advertisement Guard (RA-Guard)", RFC 7113, February 2014. 441 [IANA-PROTO] 442 Internet Assigned Numbers Authority, "Protocol Numbers", 443 February 2013, . 446 [SI6-FRAG] 447 SI6 Networks, "IPv6 NIDS evasion and improvements in IPv6 448 fragmentation/reassembly", 2012, 449 . 452 [I-D.ietf-savi-dhcp] 453 Bi, J., Wu, J., Yao, G., and F. Baker, "SAVI Solution for 454 DHCP", draft-ietf-savi-dhcp-34 (work in progress), 455 February 2015. 457 [CPNI-IPv6] 458 Gont, F., "Security Assessment of the Internet Protocol 459 version 6 (IPv6)", UK Centre for the Protection of 460 National Infrastructure, (available on request). 462 Authors' Addresses 464 Fernando Gont 465 SI6 Networks / UTN-FRH 466 Evaristo Carriego 2644 467 Haedo, Provincia de Buenos Aires 1706 468 Argentina 470 Phone: +54 11 4650 8472 471 Email: fgont@si6networks.com 472 URI: http://www.si6networks.com 474 Will Liu 475 Huawei Technologies 476 Bantian, Longgang District 477 Shenzhen 518129 478 P.R. China 480 Email: liushucheng@huawei.com 481 Gunter Van de Velde 482 Alcatel-Lucent 483 Copernicuslaan 50 484 Antwerp, Antwerp 2018 485 Belgium 487 Phone: +32 476 476 022 488 Email: gunter.van_de_velde@alcatel-lucent.com