Received: by 10.192.165.148 with SMTP id m20csp2877782imm; Sun, 22 Apr 2018 18:07:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx48og69vq71hakaGjoFxOeHQtWwl8RGds9+KgKI67wsXIMkIurnxJ72akc+bO3INrvza408u X-Received: by 2002:a17:902:788b:: with SMTP id q11-v6mr18821181pll.76.1524445646096; Sun, 22 Apr 2018 18:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524445646; cv=none; d=google.com; s=arc-20160816; b=zeIbjXqePCZjwAQkroKM4yKnBWxLlSYG4ioSy6RCF72CbbIizTB3Gt1BZ4iD6/uPzV Mpq9GCtFhQ0tNNaQwqBkpx5qxQwWPwLqbVj3vGKs2BiDzkREhB6UMhUDqsrBI5qjqtP5 ZQ4Jlff6mQLdggjbT1pWPqmbQlqrsQ2KTPfEQRFocrV75Z2nYg1mqk1lfF2LSeMjXROE YHnjb3SUos91L7gH2RrUisPmGLS9Nr2uuLdR6qbM5Ph7NOZSzU4/aUSngK3t0mvQYv5C CambGDMjVgujBps4U/3iILoi1oAGHRo2AclmKlV29KWTMAgatal2HhLrhZTfE+NJ9xXs maFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=JZilKR4CGUZbBaJOVwxNhDSGdDl6GB1H5WI2O432Ors=; b=wrQo6XPzdiPtV4BSXxofmAOvxnBM4GSOytcC6Ym5WxN3BCmjwReH5BTPRW22scZn0E okaEd9V/pV60Z+fnkKtWXiJ3INAWlrmvitNs91J15Y2vGnLcpkfhT4b5ip8N/l4NU5Qy IUsldvaTrGf4cbv1jh2/H3MsCEcN5i0UFNQybDijDe+QuF2A9oEcz0j9gD0j5PqtrhwA NhKWpa2LSepi9eIFf4A2tXzORgf8756bWxwzwiAFPlyh47b9wS/RQYmag9uqLYNEqCCU ET8F7sWCO8nDQEkRrQyESSHOsbpl0lqOnu/DhQB8HSjJRXUJtBbbE3lLjvwetkfILuA8 z3fA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si8658036pgm.91.2018.04.22.18.07.11; Sun, 22 Apr 2018 18:07:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864AbeDWBGH (ORCPT + 99 others); Sun, 22 Apr 2018 21:06:07 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:42432 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753783AbeDWBGG (ORCPT ); Sun, 22 Apr 2018 21:06:06 -0400 Received: from localhost (pool-173-77-163-229.nycmny.fios.verizon.net [173.77.163.229]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 29C2510433167; Sun, 22 Apr 2018 18:06:05 -0700 (PDT) Date: Sun, 22 Apr 2018 21:06:04 -0400 (EDT) Message-Id: <20180422.210604.1788466884650842473.davem@davemloft.net> To: amsalam20@gmail.com Cc: dlebrun@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [net] ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts From: David Miller In-Reply-To: <1524232685-1203-1-git-send-email-amsalam20@gmail.com> References: <1524232685-1203-1-git-send-email-amsalam20@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 22 Apr 2018 18:06:05 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ahmed Abdelsalam Date: Fri, 20 Apr 2018 15:58:05 +0200 > In case of seg6 in encap mode, seg6_do_srh_encap() calls set_tun_src() > in order to set the src addr of outer IPv6 header. > > The net_device is required for set_tun_src(). However calling ip6_dst_idev() > on dst_entry in case of IPv4 traffic results on the following bug. > > Using just dst->dev should fix this BUG. ... > Fixes: 8936ef7604c11 ipv6: sr: fix NULL pointer dereference when setting encap source address Please format your Fixes: tag properly next time. The commit header text should be enclosed by (" "). I fixed it up for you this time. > Signed-off-by: Ahmed Abdelsalam Applied and queued up for -stable.