From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net/sched: flower: Fix null pointer dereference when run tc vlan command Date: Wed, 11 Jul 2018 22:48:31 -0700 (PDT) Message-ID: <20180711.224831.2104910551983464294.davem@davemloft.net> References: <20180709022620.22168-1-jianbol@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jiri@resnulli.us, zahari.doychev@intel.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com To: jianbol@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:54304 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbeGLF41 (ORCPT ); Thu, 12 Jul 2018 01:56:27 -0400 In-Reply-To: <20180709022620.22168-1-jianbol@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jianbo Liu Date: Mon, 9 Jul 2018 02:26:20 +0000 > Zahari issued tc vlan command without setting vlan_ethtype, which will > crash kernel. To avoid this, we must check tb[TCA_FLOWER_KEY_VLAN_ETH_TYPE] > is not null before use it. > Also we don't need to dump vlan_ethtype or cvlan_ethtype in this case. > > Fixes: d64efd0926ba ('net/sched: flower: Add supprt for matching on QinQ vlan headers') > Signed-off-by: Jianbo Liu > Reported-by: Zahari Doychev Applied.