Bug #6552
closedInvalid IPv6 address formats possible
0%
Description
Add a host alias, in the IP Address or FQDN box of the 1st entry put:
1:2:3:::4:5:6:8 or 1:2:3:4:5:6:::8 or similar stuff with a triple colon in the middle somewhere.
It validates, but then when the ruleset is written causes "error loading the rules".
Net_IPv6::checkIPv6("1:2:3:::4:5:6:8");
returns true,
so it's a bug in the Net_IPv6 code.
I am happy to have a look tomorrow and sort out what is going wrong with the Net_IPv6 code when faced with more than 2 ":" in a row.
Updated by Phillip Davis over 8 years ago
Pull request https://github.com/pfsense/pfsense/pull/3029
Fixes handling of (what should be invalid) formats:
1:2:3:4:5:6:7:8:1.2.3.4
::1:2:3:4:5:6:7:8
1:2:3:4:5:6:7:8::
1:2:3:4:5:6:::8
::::a
::::
The above are 6 test cases that are currently allowed as "valid" IPv6 addresses, and will be reported as invalid by the corrected code.
Updated by Chris Buechler over 8 years ago
- Status changed from Feedback to Resolved
looks good, validation is correct in those cases now, no apparent regressions. Thanks Phil!
Updated by Chris Buechler over 8 years ago
- Target version changed from 2.3.1-p6 to 2.3.2