From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.1 i686) The "ipchains-restore" script automatically creates chains mentioned as rule targets. Built-in targets, however, are not created as chains. These include REJECT, DENY, ACCEPT, REDIRECT, and MASQ. That list *should* also include RETURN, but it does not. If a rule uses the built-in RETURN target, ipchains-restore will instead create an empty RETURN chain. Once that happens, will matched packets use the built-in RETURN target or will they go to this bogus RETURN chain? I'm not sure. If the later, then this bug has the potential to seriously compromise sites' packet filtering security policies. Reproducible: Always Steps to Reproduce: As root, run the following commands: # ipchains -A input -j RETURN # service ipchains save # service ipchains restore Actual Results: Diagnostic output: "Auto-creating chain RETURN". Running "ipchains -L" confirms the incorrect creation of a RETURN chain. Expected Results: No diagnostic output, and no creation of a RETURN chain. Rules with target RETURN use the built-in RETURN target, not a chain named RETURN. The following patch fixes the problem in the obvious manner: --- ipchains-restore-bad Thu Feb 1 19:03:18 2001 +++ ipchains-restore Thu Feb 1 19:03:32 2001 @@ -53,6 +53,7 @@ ACCEPT) ;; REDIRECT) ;; MASQ) ;; + RETURN) ;; *) $IPCHAINS -N $arg 2>/dev/null >/dev/null && if [ $VERBOSE ]; then echo Auto-creating chain $arg; fi esac return
Created attachment 8699 [details] suggested fix; same as in original report, but without screwey line wrapping