[Bug 1150] New: Iptables fails to match rules with malloc perturberation activated

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Sun May 21 18:57:32 CEST 2017


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

            Bug ID: 1150
           Summary: Iptables fails to match rules with malloc
                    perturberation activated
           Product: iptables
           Version: unspecified
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: iptables
          Assignee: netfilter-buglog at lists.netfilter.org
          Reporter: goeran at uddeborg.se

On my Fedora system, I've upgraded to Fedora 26 versions of iptables and, in
case it matters, glibc.

  iptables-1.6.1-2.fc26.x86_64
  glibc-2.25-4.fc26.x86_64

I also have the debugmode package installed, which sets the environment
variable MALLOC_PERTURB_ to a random value.  The variable is meant to
"detecting  errors  where  programs  incorrectly rely on allocated memory being
initialized to zero, or reuse values in memory that has already been freed." 
It appears iptables in some cases do this.

I haven't figured out exactly what conditions trigger the bug, but here is one
way to reliably reproduce the behaviour:

  iptables -t nat -N testchain
  iptables -t nat -A testchain  -j SNAT --to-source 1.2.3.4
  MALLOC_PERTURB_=42 iptables -t nat -D testchain  -j SNAT --to-source 1.2.3.4

The last command gives the error message 

  iptables: No chain/target/match by that name.

The rule I try to remove is still present.  If I disable malloc perturberation
by setting the variable to 0, the command succeeds

  MALLOC_PERTURB_=0 iptables -t nat -D testchain  -j SNAT --to-source 1.2.3.4

This gives no error message, and the rule is indeed gone.

-- 
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/20170521/a5b2dadf/attachment.html>


More information about the netfilter-buglog mailing list