Skip to contentSkip to conversation

tc: ct: Fix invalid pointer dereference

PATCH Applied Roi Dayan 3 participants 3 messages Dec 7, 2022

Subsystems (2)
lore
Share & tools
lore

Roi Dayan

author
#0 lore raw

PATCH 1/1 tc: ct: Fix invalid pointer dereference

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")
---
 tc/m_ct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tc/m_ct.c +1 -1
index a02bf0cc1655..54d64867abcb 100644
@@ -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;
 
Signature · 1 line
2.38.0
#2 lore raw
In reply to Roi Dayan
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 9 lines · On Wed, 7 Dec 2022 10:22:13 +0200 you wrote:

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")

[...]

Here is the summary with links:
- [iproute2,1/1] tc: ct: Fix invalid pointer dereference

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=4de59102f49f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html