Page MenuHomeVyOS Platform

Firewall rules allow empty nodes
Closed, ResolvedPublic

Description

When configuring the firewall, many nodes are accepted with empty values, which are not parsed into rules. Here is an example of commands that are allowed:

set firewall ipv4 forward filter rule 10 add-address-to-group
set firewall ipv4 forward filter rule 10 connection-status
set firewall ipv4 forward filter rule 10 destination
set firewall ipv4 forward filter rule 10 fragment
set firewall ipv4 forward filter rule 10 gre
set firewall ipv4 forward filter rule 10 icmp
set firewall ipv4 forward filter rule 10 ipsec
set firewall ipv4 forward filter rule 10 limit
set firewall ipv4 forward filter rule 10 log-options
set firewall ipv4 forward filter rule 10 outbound-interface
set firewall ipv4 forward filter rule 10 recent
set firewall ipv4 forward filter rule 10 set
set firewall ipv4 forward filter rule 10 source
set firewall ipv4 forward filter rule 10 tcp
set firewall ipv4 forward filter rule 10 time
set firewall ipv4 forward filter rule 10 ttl

Very few of these have subsequent error handling. Some should be obvious to the user that a value is required, like these (though an error should still be thrown if they're configured without children):

set firewall ipv4 forward filter rule 10 destination
set firewall ipv4 forward filter rule 10 inbound-interface
set firewall ipv4 forward filter rule 10 outbound-interface
set firewall ipv4 forward filter rule 10 set
set firewall ipv4 forward filter rule 10 source

But some could be misunderstood and lead to an outage or wide open firewall. For instance, let's say someone wanted to block all icmp. They may incorrectly configure:

set firewall ipv4 input filter rule 10 action drop
set firewall ipv4 input filter rule 10 icmp

And this would create this rule in nftables, dropping all traffic in subsequent rules:

counter packets 0 bytes 0 drop comment "ipv4-INP-filter-10"

They could also unintentionally allow all traffic by attempting to only allow icmp in a rule.

Details

Version
1.5
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

L0crian created this object in space S1 VyOS Public.
c-po changed the task status from Open to In progress.Sep 5 2025, 7:38 PM
c-po assigned this task to L0crian.
c-po moved this task from Need Triage to Completed on the VyOS Rolling board.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).