Received: by 10.192.165.148 with SMTP id m20csp3062868imm; Sun, 22 Apr 2018 23:10:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx49jJd8kzEhx5MKKPb21eQGQ45No44drr+iwTskezG9qzgRu8GT3NRrxTCuz80Euc7E7UsIl X-Received: by 10.99.110.199 with SMTP id j190mr15683202pgc.71.1524463848326; Sun, 22 Apr 2018 23:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524463848; cv=none; d=google.com; s=arc-20160816; b=k3WDENwW2ZRO7QquHxMpzt4SjPbCLY9cQbEL+M57wzu+f/vO/VlJ4F2H8V26+I64z5 szphisRGq+qFdpC/mQMAX5XwYo3A/GIllIKFYAK7drkHQ0R/ytukEM4B1XaP0wrjif7C +9Vtiz2lSjVPV2HImU+lA8D6YEAQdCEmC+/SgTEf6Tuk08SL3GjMSIQ79XW+kjrNjUBN s7g0y576gnurz7gAVan5578fVvUgfsSf6OvqILH9qVOIERz6JAZHpiUee3XU1QDkHUbl 8uf8IHVTyeXFkgeLg72tjzQX7cQj6oGY4zhoMW9Ej27wwZkg1LY4GilxfdaL1CWvC6xc E/9g== 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:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=NwszuMZ3viF7E6EqCBStrtFrDzZ8urdP616PZuG2Jt8=; b=cRC/heEkDv8P7bgTimhSl0luAB7jBYvdNDD6WBE6+nsqoolTceoBrab9N7ZsY6xUww fiRK1PziBX2NHwnuhhrNTLX6Xm0pA4r/Pd3MmdtKneZ82QB6vWeU5fECEDMtPQhSyoNE 2CkmTxk4m1AaQMwQjutfXxL5kJLJ60/ogHyp0wq7PZMfrl1pp97BYyHP7AV2D3OSvrTL UBAnReVXdTmbZIle3kcCgeYAxmjTIgWOoPKpKUfDcujUrbZuZXIHHGPJQ6yLFQlicUYo cI4Nh7j+ni5U7GHHfy0BbKAIPxRT1Ao7OZVLEFshL2otTph8mML/e2qh4UjUthh876Ss 0qWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J06CLRai; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si8963901pgu.98.2018.04.22.23.10.33; Sun, 22 Apr 2018 23:10:48 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J06CLRai; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823AbeDWGJN (ORCPT + 99 others); Mon, 23 Apr 2018 02:09:13 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:38436 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbeDWGJJ (ORCPT ); Mon, 23 Apr 2018 02:09:09 -0400 Received: by mail-wr0-f170.google.com with SMTP id h3-v6so37702496wrh.5; Sun, 22 Apr 2018 23:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NwszuMZ3viF7E6EqCBStrtFrDzZ8urdP616PZuG2Jt8=; b=J06CLRaiESz26X+cb1qZKbqYzzUu4qQ3sJ3JZWdL11hA2gY8XXQUSUsyua/z5T7wNx ECC2tAcgPpON6xNa90sd6ZoXZv2guWnIM4aa8myuJ1RXHyWWXeIIzMM2+KiRcKmzUaGh ZekMbTxVHRoP6fF+HMVu0vUG9oXpPX88Px2eJ8l2mpfKo+zN/kuheFlY5ckdiSCEcLWh yOO3xSOjpI6LJg+8NXgfALsPTvop5dNBdTRLnX9nolHparjI8rJx/wL5sxzUqbGv8YTc W/uRO9SFKDOmy98X6pqd+SBNQJmCBEWBmUjdq+s0GcXNqQulq24fxE87q64mh3zC6+m8 vRmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NwszuMZ3viF7E6EqCBStrtFrDzZ8urdP616PZuG2Jt8=; b=b+qVWEK+qtW8pGIszO5d9AAc2jhMFp2bRThHhZm22576UfrwaLSRkSQ7BP0wvetDbi cd5xozETC0xzxlLPDP3DBph9fzX6QQPNJ4EGZITDzipcmk/SV67dtWK3H9b30b1SQgIn p4CjjpGOgLRNk9GFnNtu7n3Ud87ICZodW3v6WyZF6sJi75HOX9nd/9pnBfSngOg3Okzc Ts/W+FfyM3dmvdWe6n/5YVd1x+8moDLRiNpFRAblSefNXKOe86RQpQq/AUUKQz2Ol2Db rPnBZO3L5TUd3CrzY04Y5uTwITqe3EAx07WjRQngN31HdG0KYQdPwKzkDbHUhrMZR0O/ DExg== X-Gm-Message-State: ALQs6tDx+A7+he67MvEdlF7Q9ewf2P2U3vGaiziw8hr4ckIIX6tVJypo GGEb+pfxhkSOiIQrGGEKTAMpR46v X-Received: by 2002:adf:e9c3:: with SMTP id l3-v6mr11014541wrn.195.1524463748119; Sun, 22 Apr 2018 23:09:08 -0700 (PDT) Received: from AHABDELS-M-M2VD (wifi-guest-target.gssi.infn.it. [192.135.27.147]) by smtp.gmail.com with ESMTPSA id l53-v6sm26988496wrc.80.2018.04.22.23.09.06 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 22 Apr 2018 23:09:07 -0700 (PDT) Date: Mon, 23 Apr 2018 08:09:23 +0200 From: Ahmed Abdelsalam To: David Miller 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 Message-Id: <20180423080923.9dc889c97a24df7337ca4958@gmail.com> In-Reply-To: <20180422.210604.1788466884650842473.davem@davemloft.net> References: <1524232685-1203-1-git-send-email-amsalam20@gmail.com> <20180422.210604.1788466884650842473.davem@davemloft.net> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.21; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 22 Apr 2018 21:06:04 -0400 (EDT) David Miller wrote: > 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. > Ok! Thanks David for your time. > > Signed-off-by: Ahmed Abdelsalam > > Applied and queued up for -stable. -- Ahmed Abdelsalam