/22 Address-Space Slicer & ROA maxLength Depth Caliper ROA CALIPER max /22 minimal ROA max /24 permissive authorizes all 4 × /24 198.51.100.0/22 Announced Aggregate · 1,024 IPs (AS64496) ROA VALID ✓ .100.0/24 unannounced sub-prefix 256 IPs .101.0/24 unannounced sub-prefix 256 IPs .102.0/24 Forged /24 sub-prefix EXPOSED LOCKED ✓ .103.0/24 unannounced sub-prefix 256 IPs maxLength /24: RPKI VALID - HOLE maxLength /22: INVALID - HOLE CLOSED
Routing & Security

When a Valid ROA Still Leaves a Hole

BYOIP.info Editorial19 October 2026 10 min read Last technically reviewed 19 October 2026

Key takeaways

  • Route Origin Validation checks the origin ASN and prefix length against covering ROAs, but it does not authenticate the rest of the AS path.
  • A ROA for a /22 with maxLength /24 pre-authorizes every /24 inside that block if an attacker spoofs the authorized origin ASN in the AS path.
  • IPinfo research on a 28 September 2026 sample found that 16.2% of RPKI-covered IPv4 routes had a covering authorization permitting longer unannounced prefixes.
  • RFC 9319 recommends minimal-length ROAs that authorize only the exact prefixes actually announced in BGP.

A Route Origin Authorization (ROA) with a permissive maxLength can leave unannounced sub-prefixes exposed to forged-origin BGP hijacks even when your aggregate route shows RPKI-valid. Because BGP prefers the most specific prefix, an attacker who announces a longer prefix inside your ROA's permitted range and appends your authorized origin ASN to the AS path can pass Route Origin Validation (ROV) everywhere.

Publishing a ROA is a major step forward for BYOIP and routing security, but "Valid" is only as tight as the prefix lengths you authorize. Understanding how covering ROAs interact with longest-prefix match explains why RFC 9319 recommends minimal-length ROAs.

How a loose maxLength creates a forged-origin opening

Suppose your organization holds 198.51.100.0/22 (four contiguous /24 blocks) and originates only the single 198.51.100.0/22 aggregate from AS64496. When creating the ROA, an operator sets maxLength: 24 "just in case" the team later splits the block into /24 announcements.

That single setting changes what validating routers accept across the Internet:

AnnouncementAS pathROV state under /22-24 AS64496ROV state under tight /22-22 AS64496
Legitimate 198.51.100.0/22... 64496ValidValid
Hijacker 198.51.100.0/24 (unauthorized origin)... 64511Invalid (wrong origin ASN)Invalid (wrong origin ASN and length)
Hijacker 198.51.100.0/24 (forged origin)... 64511 64496Valid (wins longest-prefix match)Invalid (exceeds maxLength 22)

Route Origin Validation (RFC 6811) checks only two things against the covering ROA: whether the rightmost ASN in the AS_PATH matches the ROA's origin ASN, and whether the announced prefix length is less than or equal to maxLength. It does not verify that AS64496 actually sent the announcement to AS64511.

When the ROA permits /24 and the legitimate holder only announces /22, no legitimate /24 route exists in global routing tables to compete with the forged /24. Every network on the Internet prefers a valid /24 over a valid /22.

What recent incidents and measurements show

This is not a purely theoretical edge case. In the August 2026 BGP hijack affecting Virtualizor's infrastructure, routing analysis showed an unauthorized more-specific route announced with the legitimate origin ASN appended to the AS path while a covering ROA permitted the longer prefix. Because both the origin ASN and prefix length satisfied the ROA, Origin Validation alone could not reject the route.

Subsequent IPinfo research on a 28 September 2026 routing sample (using routes visible from at least two public-collector peers) found that 16.2% of RPKI-covered IPv4 routes had a covering authorization that permitted longer prefixes without an operator-announced more-specific route filling that space. That 16.2% figure measures structural exposure rather than a count of active attacks, and it shows how often operators over-provision maxLength.

Minimal-length ROAs vs cloud BYOIP requirements

IETF operational guidance in RFC 9319 (Section 5) is direct: avoid using maxLength wider than the prefix itself unless every permitted sub-prefix is actually announced, and instead publish discrete ROAs for the exact prefixes in your routing plan.

When onboarding a prefix to a cloud BYOIP platform, check how the platform's control plane validates and subdivides your block:

  • Single aggregate announcement: If you import a /22 or /24 and announce it only as that single block, set maxLength equal to the prefix length (/22 for a /22, /24 for a /24).
  • Google Cloud Standard Tier: Google's documentation explicitly recommends publishing separate exact-length ROAs for the public advertised prefix and for each delegated sub-prefix you provision, rather than one wide covering ROA, when you want the tightest authorization scope.
  • AWS VPC IPAM: AWS IPAM requires maxLength to allow /24 for IPv4 (and /48 for IPv6) on advertisable pools so you can allocate regional CIDRs. When a platform requires a wider maxLength, pair your ROA with BGP monitoring for unexpected sub-prefixes and path validation controls such as ASPA.

Step-by-step process for tightening permissive ROAs

Never delete an existing ROA before its replacement has propagated to relying-party caches, or your live routes will briefly evaluate as NotFound or Invalid. Follow this make-before-break process.

Compare
Match ROA maxLength against live BGP
Publish
Create exact-length replacement ROAs
Propagate
Wait for relying-party cache refresh
Retire
Remove the over-permissive covering ROA
1

Compare

Match ROA maxLength against live BGP

Export your current RPKI ROAs and compare each entry's maxLength against the prefixes you actually originate in BGP.

  • Flag any ROA where maxLength is longer than the announced prefix (for example, a /21 ROA with maxLength: 24 where only the /21 is announced).
  • Check whether a cloud BYOIP service (such as AWS VPC IPAM) mandates that wider maxLength before changing it.
Step 0 of 0

FAQ

What Is RPKI? ROAs, Origin Validation and Your BYOIP Prefix
ASPA After You Already Publish ROAs
What Is BGP? How Internet Routing Works
What Is CIDR Notation? IP Address Ranges Explained
Virtualizor reports package-signing changes after August BGP hijack
RFC 9319 - The Use of maxLength in the RPKI
RFC 6811 - BGP Prefix Origin Validation
IPinfo - RPKI Protects 70% of Internet Routes

Ready to see where BYOIP is supported?

Continue the series

GRE / IPsec Tunnel Cross-Section & BGP Filter Valve Gates PRE-FILTER METER 4,980 / 5,000 RIB-in gauge (99.6%) COUNTED PRE-FILTER before import gate GRE / IPSEC PIPE IMPORT · ALLOW 203.0.113.0/24 matches allow profile PASS → RIB installed in table 198.51.100.0/24 unmatched prefix DROP ✕ blocked at gate BYPASSES EXPORT → extra_prefixes explicit tunnel routes EXPORT FILTER valve gate skipped TUNNEL EGRESS advertised to peer RIB-in cap counts pre-filter · extra_prefixes conduit bypasses export filter gate
Routing & Security

What a BGP Tunnel Filter Actually Does

Import and export prefix filters control which routes cross a GRE or IPsec BGP session. Learn how allow and deny profiles behave, why explicit tunnel prefixes can bypass export filters, and why inbound route limits apply before filtering.

9 min read · Updated 19 October 2026

Read article
ROA Verifies Origin · ASPA Enforces Valley-Free Upstream Elevation UPPER TIER: TRANSIT PROVIDERS LOWER TIER: CUSTOMER / EDGE V-SHAPED ROUTE VALLEY C2P IN ASPA ✓ P2C DOWN ↘ AS64496 Origin · ROA ✓ AS64497 Authorized Provider AS64498 Customer (Valley) AS64499 Upstream Transit NOT IN C2P ASPA ✕ VALLEY LEAK CAUGHT Customer-to-Provider (C2P) elevation check catches unauthorized valley climbs
Routing & Security

ASPA After You Already Publish ROAs

ROAs verify which ASN may originate a prefix, but they cannot detect route leaks or forged upstream paths. Learn how Autonomous System Provider Authorization (ASPA) validates Customer-to-Provider hops and how to prepare your records.

10 min read · Updated 19 October 2026

Read article