Skip to content

Commit 12d5d1c

Browse files
authored
iana: Remove hardcoded multicast prefixes (#8456)
Remove multicast IP prefixes (RFCs 3171 & 4291) from the hardcoded list of reserved addresses in the `iana` package. These prefixes are not listed in IANA's Special-Purpose Address Registries or otherwise forbidden by the Baseline Requirements, so hardcoding them in Boulder probably isn't appropriate. Instead, operators can configure them in `AdminBlockedPrefixes` to prevent their use as identifiers. For Let's Encrypt, this has been done in IN-11854. They can also use their resolvers' configuration (e.g. Unbound's `private-address` and `do-not-query-address` directives) to exclude them from DNS query results. For Let's Encrypt, this has been done for a long time (since before the current config's first blame). Part of #8237
1 parent 88ed5e7 commit 12d5d1c

File tree

4 files changed

+8
-26
lines changed

4 files changed

+8
-26
lines changed

iana/ip.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,7 @@ func init() {
5454
panic(err)
5555
}
5656

57-
// Add multicast addresses, which aren't in the IANA registries.
58-
//
59-
// TODO(#8237): Move these entries to IP address blocklists once they're
60-
// implemented.
61-
additionalPrefixes := []reservedPrefix{
62-
{
63-
addressFamily: "IPv4",
64-
addressBlock: netip.MustParsePrefix("224.0.0.0/4"),
65-
name: "Multicast Addresses",
66-
rfc: "[RFC3171]",
67-
},
68-
{
69-
addressFamily: "IPv6",
70-
addressBlock: netip.MustParsePrefix("ff00::/8"),
71-
name: "Multicast Addresses",
72-
rfc: "[RFC4291]",
73-
},
74-
}
75-
76-
reservedPrefixes = slices.Concat(ipv4Prefixes, ipv6Prefixes, additionalPrefixes)
57+
reservedPrefixes = slices.Concat(ipv4Prefixes, ipv6Prefixes)
7758

7859
// Sort the list of reserved prefixes in descending order of prefix size, so
7960
// that checks will match the most-specific reserved prefix first.

iana/ip_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ func TestIsReservedAddr(t *testing.T) {
3838
{"0100::", "Discard-Only Address Block"}, // part of a reserved block in a non-canonical IPv6 format
3939
{"0100::0000:ffff:ffff:ffff:ffff", "Discard-Only Address Block"}, // part of a reserved block in a non-canonical IPv6 format
4040
{"0100::0002:0000:0000:0000:0000", ""}, // non-reserved but in a non-canonical IPv6 format
41-
42-
// TODO(#8237): Move these entries to IP address blocklists once they're
43-
// implemented.
44-
{"ff00::1", "Multicast Addresses"}, // second-lowest IP in a reserved /8 we hardcode
45-
{"ff10::1", "Multicast Addresses"}, // in the middle of a reserved /8 we hardcode
46-
{"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "Multicast Addresses"}, // highest IP in a reserved /8 we hardcode
4741
}
4842

4943
for _, tc := range cases {

policy/pa_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ func TestWillingToIssue(t *testing.T) {
184184
identifier.NewIP(netip.MustParseAddr(`64.112.117.66`)),
185185
identifier.NewIP(netip.MustParseAddr(`2602:80a:6000:666::1`)),
186186
identifier.NewIP(netip.MustParseAddr(`2602:80a:6000:666::1%lo`)),
187+
identifier.NewIP(netip.MustParseAddr(`ff00::1`)),
188+
identifier.NewIP(netip.MustParseAddr(`ff10::1`)),
189+
identifier.NewIP(netip.MustParseAddr(`ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff`)),
187190
}
188191
blocklistContents := []string{
189192
`website2.com`,
@@ -202,7 +205,9 @@ func TestWillingToIssue(t *testing.T) {
202205
}
203206
adminBlockedPrefixesContents := []string{
204207
`64.112.117.66/32`,
208+
`224.0.0.0/4`,
205209
`2602:80a:6000:666::/64`,
210+
`ff00::/8`,
206211
}
207212

208213
shouldBeAccepted := identifier.ACMEIdentifiers{

test/ident-policy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ AdminBlockedNames:
3939
AdminBlockedPrefixes:
4040
- "64.112.117.66/32"
4141
- "64.112.117.68/30"
42+
- "224.0.0.0/4"
4243
- "2602:80a:6000:baa:ffff:ffff:ffff:ffff/128"
4344
- "2602:80a:6000:bad::/64"
45+
- "ff00::/8"

0 commit comments

Comments
 (0)