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 2/2] tc: ct: Fix invalid pointer derefence
Date: Wed, 16 Nov 2022 09:33:12 +0200 [thread overview]
Message-ID: <20221116073312.177786-3-roid@nvidia.com> (raw)
In-Reply-To: <20221116073312.177786-1-roid@nvidia.com>
Using mcaro 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 1b8984075a67..e1c4b822f8ac 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
prev parent reply other threads:[~2022-11-16 7:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 7:33 [PATCH iproute2 0/2] two fixes for tc ct command Roi Dayan
2022-11-16 7:33 ` [PATCH iproute2 1/2] tc: ct: Fix ct commit nat forcing addr Roi Dayan
2022-11-16 18:21 ` Stephen Hemminger
2022-11-17 5:35 ` Roi Dayan
2022-11-17 14:00 ` Roi Dayan
2022-11-24 8:21 ` Roi Dayan
2022-11-16 7:33 ` Roi Dayan [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=20221116073312.177786-3-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.