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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS 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 E295DC10F0E for ; Mon, 15 Apr 2019 20:35:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A98F42087C for ; Mon, 15 Apr 2019 20:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbfDOUfQ (ORCPT ); Mon, 15 Apr 2019 16:35:16 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:57732 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbfDOUfQ (ORCPT ); Mon, 15 Apr 2019 16:35:16 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 8B2AB14D8ADCC; Mon, 15 Apr 2019 13:35:15 -0700 (PDT) Date: Mon, 15 Apr 2019 13:35:14 -0700 (PDT) Message-Id: <20190415.133514.738049099954355080.davem@davemloft.net> To: jonathan.lemon@gmail.com Cc: netdev@vger.kernel.org, dsahern@gmail.com, kernel-team@fb.com Subject: Re: [PATCH net] route: Avoid crash from dereferencing NULL rt->from From: David Miller In-Reply-To: <20190414212129.2306318-1-jonathan.lemon@gmail.com> References: <20190414212129.2306318-1-jonathan.lemon@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Mon, 15 Apr 2019 13:35:15 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jonathan Lemon Date: Sun, 14 Apr 2019 14:21:29 -0700 > When __ip6_rt_update_pmtu() is called, rt->from is RCU dereferenced, but is > never checked for null - rt6_flush_exceptions() may have removed the entry. > > [ 1913.989004] RIP: 0010:ip6_rt_cache_alloc+0x13/0x170 > [ 1914.209410] Call Trace: > [ 1914.214798] > [ 1914.219226] __ip6_rt_update_pmtu+0xb0/0x190 > [ 1914.228649] ip6_tnl_xmit+0x2c2/0x970 [ip6_tunnel] > [ 1914.239223] ? ip6_tnl_parse_tlv_enc_lim+0x32/0x1a0 [ip6_tunnel] > [ 1914.252489] ? __gre6_xmit+0x148/0x530 [ip6_gre] > [ 1914.262678] ip6gre_tunnel_xmit+0x17e/0x3c7 [ip6_gre] > [ 1914.273831] dev_hard_start_xmit+0x8d/0x1f0 > [ 1914.283061] sch_direct_xmit+0xfa/0x230 > [ 1914.291521] __qdisc_run+0x154/0x4b0 > [ 1914.299407] net_tx_action+0x10e/0x1f0 > [ 1914.307678] __do_softirq+0xca/0x297 > [ 1914.315567] irq_exit+0x96/0xa0 > [ 1914.322494] smp_apic_timer_interrupt+0x68/0x130 > [ 1914.332683] apic_timer_interrupt+0xf/0x20 > [ 1914.341721] > > Signed-off-by: Jonathan Lemon Applied with Fixes: tag added, and queued up for -stable. Thanks.