Page MenuHomeVyOS Platform

ipaddrcheck doesn't detect certain malformed ranges
Closed, ResolvedPublicBUG

Description

The ipaddrcheck does not validate that the start and end addresses of an IP range are logically ordered.

root@r14:/home/vyos# ipaddrcheck --verbose --is-ipv4-range 192.0.2.0-1.8.2.1
root@r14:/home/vyos# 
root@r14:/home/vyos# echo $?
0
root@r14:/home/vyos#

Details

Version
VyOS 2026.03.09-0026-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

dmbaturin renamed this task from The ipaddrcheck does not validate that the start and end addresses of an IP range are logically ordered. to ipaddrcheck doesn't detect certain malformed ranges.Mar 11 2026, 2:24 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.

This issue remained hidden because most malformed ranges like 192.0.2.100-192.0.2.100 were detected correctly.

The problem was that the check didn't account for the fact that in_addr->s_addr is in the network by order (big endian), which makes comparisons incorrect for cases like in the task description.

Note: IPv6 is unaffected because the comparison logic is byte-by-byte there.

Viacheslav triaged this task as Normal priority.Mar 11 2026, 3:36 PM
Viacheslav moved this task from Need Triage to Completed on the VyOS Rolling board.