From: Roi Dayan <roid@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: Roi Dayan <roid@nvidia.com>, Paul Blakey <paulb@nvidia.com>,
"Stephen Hemminger" <stephen@networkplumber.org>,
David Ahern <dsahern@kernel.org>
Subject: [PATCH iproute2 1/1] tc: ct: Fix invalid pointer dereference
Date: Wed, 7 Dec 2022 10:22:13 +0200 [thread overview]
Message-ID: <20221207082213.707577-1-roid@nvidia.com> (raw)
Using macro NEXT_ARG_FWD does not validate argc.
Use macro NEXT_ARG which validates argc while parsing args
in the same loop iteration.
Fixes: c8a494314c40 ("tc: Introduce tc ct action")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
---
tc/m_ct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_ct.c b/tc/m_ct.c
index a02bf0cc1655..54d64867abcb 100644
--- a/tc/m_ct.c
+++ b/tc/m_ct.c
@@ -243,7 +243,7 @@ parse_ct(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
return -1;
}
- NEXT_ARG_FWD();
+ NEXT_ARG();
if (matches(*argv, "port") != 0)
continue;
--
2.38.0
next reply other threads:[~2022-12-07 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 8:22 Roi Dayan [this message]
2022-12-07 13:59 ` [PATCH iproute2 1/1] tc: ct: Fix invalid pointer dereference Jiri Pirko
2022-12-07 17:00 ` patchwork-bot+netdevbpf
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=20221207082213.707577-1-roid@nvidia.com \
--to=roid@nvidia.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulb@nvidia.com \
--cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.