From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEF32CA9EA0 for ; Fri, 25 Oct 2019 15:49:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97BBC21D7B for ; Fri, 25 Oct 2019 15:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572018546; bh=yjAaE0xQhH20vJrkI1srEKz9AtxqLuI40WnRKCUXgj8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ArW1JUgfTNCs19vVsd4XU2hzakEm17SCRzduBaOj5fStRmBdEcRciXYEQs/Y8L14r b/3aTV2N0iCxlJxJw1Ld3chayH8fizWa45+DfOBh0vZc8d87J8kuCK6vLFeyaZmztq EbpD+9+NlY+ukdnq82+lh6yEP6udLK62LV3dGN+I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502201AbfJYPtG (ORCPT ); Fri, 25 Oct 2019 11:49:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:57952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502051AbfJYPtF (ORCPT ); Fri, 25 Oct 2019 11:49:05 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03F39206DD; Fri, 25 Oct 2019 15:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572018545; bh=yjAaE0xQhH20vJrkI1srEKz9AtxqLuI40WnRKCUXgj8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0cgKbZZFBv4uMey3849inISOi+o8JI/NP51o1L8I+z1XUhBRwjCrkqDC7OKZ2wpue 5uHXeoI08lQR31eMc4qNzUO+kgiEFikYiwzmbTzR+To6Itq+Q5QHFTxWU9zp0JlKCF RkFlUdCpVDOuS+vNw3wOE0etJU5F0p6s7wp/Pp7U= Date: Fri, 25 Oct 2019 11:49:03 -0400 From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mahesh Bandewar , "David S . Miller" , netdev@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.3 12/33] blackhole_netdev: fix syzkaller reported issue Message-ID: <20191025154903.GH31224@sasha-vm> References: <20191025135505.24762-1-sashal@kernel.org> <20191025135505.24762-12-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191025135505.24762-12-sashal@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Oct 25, 2019 at 09:54:44AM -0400, Sasha Levin wrote: >From: Mahesh Bandewar > >[ Upstream commit b0818f80c8c1bc215bba276bd61c216014fab23b ] > >While invalidating the dst, we assign backhole_netdev instead of >loopback device. However, this device does not have idev pointer >and hence no ip6_ptr even if IPv6 is enabled. Possibly this has >triggered the syzbot reported crash. > >The syzbot report does not have reproducer, however, this is the >only device that doesn't have matching idev created. > >Crash instruction is : > >static inline bool ip6_ignore_linkdown(const struct net_device *dev) >{ > const struct inet6_dev *idev = __in6_dev_get(dev); > > return !!idev->cnf.ignore_routes_with_linkdown; <= crash >} > >Also ipv6 always assumes presence of idev and never checks for it >being NULL (as does the above referenced code). So adding a idev >for the blackhole_netdev to avoid this class of crashes in the future. > >Signed-off-by: David S. Miller >Signed-off-by: Sasha Levin I've dropped this patch. -- Thanks, Sasha