Project

General

Profile

Actions

Bug #6552

closed

Invalid IPv6 address formats possible

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

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

0%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

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.

Actions #2

Updated by Chris Buechler over 8 years ago

  • Status changed from New to Feedback

PR merged

Actions #3

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!

Actions #4

Updated by Chris Buechler over 8 years ago

  • Target version changed from 2.3.1-p6 to 2.3.2
Actions

Also available in: Atom PDF