From: Pedro Tammela Date: Fri, 24 Feb 2023 17:57:56 +0000 (-0300) Subject: tc: m_action: fix parsing of TCA_EXT_WARN_MSG X-Git-Tag: v6.3.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70b9ebae63ce7e6f9911bdfbcf47a6d18f24159a;p=thirdparty%2Fiproute2.git tc: m_action: fix parsing of TCA_EXT_WARN_MSG It should sit within the TCA_ACT_TAB hierarchy, otherwise the access to tb is out of bounds: ./tc action ls action csum total acts 1 action order 0: csum (?empty) action pass index 1 ref 1 bind 0 not_in_hw Segmentation fault (core dumped) Fixes: 60359956 ("tc: add new attr TCA_EXT_WARN_MSG") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Stephen Hemminger --- diff --git a/tc/m_action.c b/tc/m_action.c index 0400132ce..6c91af2ce 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -586,7 +586,7 @@ int print_action(struct nlmsghdr *n, void *arg) open_json_object(NULL); tc_dump_action(fp, tb[TCA_ACT_TAB], tot_acts ? *tot_acts:0, false); - print_ext_msg(tb); + print_ext_msg(&tb[TCA_ACT_TAB]); close_json_object(); return 0;