lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 Oct 2018 22:55:54 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Davide Caratti <dcaratti@...hat.com>
Cc:     Cong Wang <xiyou.wangcong@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net 1/4] net/sched: act_gact: disallow 'goto chain' on
 fallback control action

Sat, Oct 20, 2018 at 11:33:07PM CEST, dcaratti@...hat.com wrote:
>in the following command:
>
> # tc action add action <c1> random <rand_type> <c2> <rand_param>
>
>'goto chain x' is allowed only for c1: setting it for c2 makes the kernel
>crash with NULL pointer dereference, since TC core doesn't initialize the
>chain handle.
>
>Signed-off-by: Davide Caratti <dcaratti@...hat.com>
>---
> net/sched/act_gact.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
>index cd1d9bd32ef9..505138047e5c 100644
>--- a/net/sched/act_gact.c
>+++ b/net/sched/act_gact.c
>@@ -88,6 +88,11 @@ static int tcf_gact_init(struct net *net, struct nlattr *nla,
> 		p_parm = nla_data(tb[TCA_GACT_PROB]);
> 		if (p_parm->ptype >= MAX_RAND)
> 			return -EINVAL;
>+		if (TC_ACT_EXT_CMP(p_parm->paction, TC_ACT_GOTO_CHAIN)) {
>+			NL_SET_ERR_MSG(extack,
>+				       "goto chain not allowed on fallback");

No need for a line-wrap. Otherwise
Acked-by: Jiri Pirko <jiri@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ