path: root/extensions/libxt_limit.c
diff options
authorJan Engelhardt <>2009-10-27 02:59:33 +0100
committerJan Engelhardt <>2009-10-29 19:04:00 +0100
commit4f0d7b660e0ae8f678142fd2a1722b27ad472169 (patch)
treeecd74d135b8d32ecdae966b08ef5e371bc99c84f /extensions/libxt_limit.c
parent7c4d668c9c2ee007c82063b7fc784cbbf46b2ec4 (diff)
iptables: fix undersized deletion mask creation
The mask created for the -D rulespec is simply too small. xtables_targets points to whatever target has last been loaded, so xtables_targets->size is quite almost wrong, as we need to use the size of the target for the specific rule that is about to be deleted. This bug existed ever since iptables history is tracked, and requires certain circumstances to be visible, where the deletion operation is one. Furthermore, multiple userspace target extensions must have been loaded, and a target B whose .size is smaller than the target A of the rule we are about to delete must have been loaded more recently than target A. The minimal testcase is (rule 60007 gets wrongly removed) *nat -F -X -A POSTROUTING -p udp -j SNAT --to -A POSTROUTING -p udp -j SNAT --to -A POSTROUTING -p udp -j CONNMARK --set-mark 0 -D POSTROUTING -p udp -j SNAT --to COMMIT References: Signed-off-by: Jan Engelhardt <>
Diffstat (limited to 'extensions/libxt_limit.c')
0 files changed, 0 insertions, 0 deletions