From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft 2/2] tests: shell: use-after-free from abort path
Date: Fri, 9 Aug 2019 13:34:07 +0200 [thread overview]
Message-ID: <20190809113407.2442-2-pablo@netfilter.org> (raw)
In-Reply-To: <20190809113407.2442-1-pablo@netfilter.org>
Rule that fails to be added while holding a bound set triggers
user-after-free from the abort path.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
tests/shell/testcases/transactions/0050rule_1 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100755 tests/shell/testcases/transactions/0050rule_1
diff --git a/tests/shell/testcases/transactions/0050rule_1 b/tests/shell/testcases/transactions/0050rule_1
new file mode 100755
index 000000000000..7c487e2e4710
--- /dev/null
+++ b/tests/shell/testcases/transactions/0050rule_1
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+RULESET="table inet filter {
+ flowtable ft {
+ hook ingress priority 0; devices = { x, y, z };
+ }
+
+chain forward {
+ type filter hook forward priority 0; policy drop;
+
+ ip protocol { tcp, udp } counter flow add @ft
+ ip6 nexthdr { tcp, udp } counter flow add @ft
+ counter
+ }
+}"
+
+$NFT -f - <<< "$RULESET" >/dev/null
--
2.11.0
prev parent reply other threads:[~2019-08-09 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 11:34 [PATCH nft 1/2] tests: shell: move chain priority and policy to chain folder Pablo Neira Ayuso
2019-08-09 11:34 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190809113407.2442-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).