]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
tests: shell: Add test for nfbz#1391
authorPhil Sutter <phil@nwl.cc>
Tue, 28 Apr 2020 14:12:23 +0000 (16:12 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 28 Apr 2020 15:42:47 +0000 (17:42 +0200)
Problem is fixed since commit c550c81fd373e ("nft: cache: Fix
nft_release_cache() under stress"), looks like another case of
use-after-free.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/tests/shell/testcases/ipt-restore/0013-test-mode_0 [new file with mode: 0755]

diff --git a/iptables/tests/shell/testcases/ipt-restore/0013-test-mode_0 b/iptables/tests/shell/testcases/ipt-restore/0013-test-mode_0
new file mode 100755 (executable)
index 0000000..65c3b9a
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+# segfault with --test reported in nfbz#1391
+
+printf '%s\nCOMMIT\n' '*nat' '*raw' '*filter' | $XT_MULTI iptables-restore --test