Project

General

Profile

Bug #6552

Invalid IPv6 address formats possible

Added by Phillip Davis over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
06/28/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:

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.

History

#1 Updated by Phillip Davis over 3 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.

#2 Updated by Chris Buechler over 3 years ago

  • Status changed from New to Feedback

PR merged

#3 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

looks good, validation is correct in those cases now, no apparent regressions. Thanks Phil!

#4 Updated by Chris Buechler over 3 years ago

  • Target version changed from 2.3.1-p6 to 2.3.2

Also available in: Atom PDF