[Bug 1085] New: No warning for weird interface characters if interface contains wildcard character

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Tue Aug 30 12:43:56 CEST 2016


https://bugzilla.netfilter.org/show_bug.cgi?id=1085

            Bug ID: 1085
           Summary: No warning for weird interface characters if interface
                    contains wildcard character
           Product: iptables
           Version: CVS (please indicate timestamp)
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: iptables
          Assignee: netfilter-buglog at lists.netfilter.org
          Reporter: netfilterbugzilla at s.cdmweb.de

When I try to match on an interface with illegal characters (e.g. whitespace or
/), I get a warning, as expected:

# iptables -A FORWARD -i "asd f"
Warning: weird character in interface `asd f' ('/' and ' ' are not allowed by
the kernel).

The rule is inserted successfully into the ruleset.

However, when I make the interface match a wildcard, I do no longer get the
warning:
# iptables -A FORWARD -i "asd f+"


Expected behavior: I get a warning about the whitespace in my interface match.
Observed behavior Rule is accepted without any warning, iptables-save confirms
that the rule was successfully inserted.

The issue can be seen directly in the function xtables_parse_interface:
https://git.netfilter.org/iptables/tree/libxtables/xtables.c?h=v1.6.0#n518
The for loop which checks for weird characters is not executed if the interface
match string ends on '+'.


Version: iptables 1.6.0
As of git commit 921dfe98c69b7a71e31e48df79f4986d7bde7810 (HEAD on 30th Aug
2016), the mentioned code did not change.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20160830/2b1faae1/attachment.html>


More information about the netfilter-buglog mailing list