[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170808053021.GB1853@nanopsycho>
Date: Tue, 8 Aug 2017 07:30:21 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Xin Long <lucien.xin@...il.com>
Cc: network dev <netdev@...r.kernel.org>, davem@...emloft.net,
Cong Wang <xiyou.wangcong@...il.com>
Subject: Re: [PATCHv2 net] net: sched: set xt_tgchk_param par.net properly in
ipt_init_target
Tue, Aug 08, 2017 at 04:13:27AM CEST, lucien.xin@...il.com wrote:
>Now xt_tgchk_param par in ipt_init_target is a local varibale,
>par.net is not initialized there. Later when xt_check_target
>calls target's checkentry in which it may access par.net, it
>would cause kernel panic.
>
>Jaroslav found this panic when running:
>
> # ip link add TestIface type dummy
> # tc qd add dev TestIface ingress handle ffff:
> # tc filter add dev TestIface parent ffff: u32 match u32 0 0 \
> action xt -j CONNMARK --set-mark 4
>
>This patch is to pass net param into ipt_init_target and set
>par.net with it properly in there.
>
>v1->v2:
> As Wang Cong pointed, I missed ipt_net_id != xt_net_id, so fix
> it by also passing net_id to __tcf_ipt_init.
>
>Reported-by: Jaroslav Aster <jaster@...hat.com>
>Signed-off-by: Xin Long <lucien.xin@...il.com>
Fixes what? You need to have "Fixes" tag for net patches.
Powered by blists - more mailing lists