Page MenuHomeVyOS Platform

Firewall group configuration allows to set incorrect port range and invalid port
Closed, ResolvedPublicBUG

Description

In this example first port is greater than the last port

set firewall group port-group PORTGRP port '25-1'

Expected validation, for example:

vyos@r4# set firewall group port-group PGRP port 25-1

  Error: [25-1] is not a valid port range
  
  Value validation failed

Also it allows to set out of port range value:

set firewall group port-group PORTGRP port 70000

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4-rolling-202201020317
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from Firewall group configuration allows incorrect port range to Firewall group configuration allows to set incorrect port range and invalid port.Jan 4 2022, 12:10 PM
Viacheslav updated the task description. (Show Details)
sarthurdev changed the task status from Open to Needs testing.Jan 10 2022, 9:02 PM
sarthurdev claimed this task.
sarthurdev added a subscriber: sarthurdev.

I ve testet it on (Version:VyOS 1.4-rolling-202201200814). It seems well.

vyos@vyos# set firewall group port-group TEST1 port 65535
[edit]
vyos@vyos# set firewall group port-group TEST1 port 65536

Error: 65536 is not a valid port or port range



Invalid value
Value validation failed
Set failed

[edit]
vyos@vyos# set firewall group port-group TEST1 port 70000

Error: 70000 is not a valid port or port range



Invalid value
Value validation failed
Set failed

[edit]
vyos@vyos# set firewall group port-group TEST1 port 25-1

Error: 25-1 is not a valid port or port range



Invalid value
Value validation failed
Set failed

[edit]

Viacheslav moved this task from In Progress to Finished on the VyOS 1.4 Sagitta board.