Tue, Aug 08, 2017 at 09:25:25AM CEST, lucien....@gmail.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.
>  As Wang Cong pointed, I missed ipt_net_id != xt_net_id, so fix
>  it by also passing net_id to __tcf_ipt_init.
>  Missed the fixes tag, so add it.
>Fixes: ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put")
>Reported-by: Jaroslav Aster <jas...@redhat.com>
>Signed-off-by: Xin Long <lucien....@gmail.com>

Acked-by: Jiri Pirko <j...@mellanox.com>

Reply via email to