Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp564942imm; Wed, 1 Aug 2018 01:16:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfGXRn1MmaKndTeEm3HoTrc2khFI8gwZxfXgSPE0LMC6BcP2eXPH1vNW4/XKacxV1P5WIcW X-Received: by 2002:a63:d15:: with SMTP id c21-v6mr23918973pgl.322.1533111405315; Wed, 01 Aug 2018 01:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533111405; cv=none; d=google.com; s=arc-20160816; b=zka+tiUtrtIyfphHqtCdpU1vx7oCROSo5/pu6eT4RPx6Q+3exllvf4wfnkfm3fMeTR iyDd7/4/+n9RzTi0oH3vbCr+5eORCzFVvZAl+rl5A00/aurCida5JqA2ZkcSHKNizwtV S8dBWO+Y8miZRuojmFj+DAfGOt5dnFK9dNuWG5reLv5cPgCQSztjl6eYT/yZdS6ZCHJy 6mV8uIucYHeYCVZ6FwZfOhvZD//vFjc4hBzSrr/9VkzUhDf7BMNmTiMDj50cdivIqlKv aZaDLgyH3jd/R6hMeW96OxSBshXubDhVe43p6QdnOmrotS0GGF/nEWIC/ikaIX8bqNTX e9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=NSBtX6j6F9Fru5XlQuMjhPIwS1rrRjizT3sfgBzlQMQ=; b=mwsZ3bQjUxbvse9MOvKrEy7x//J6r8EJ1LKmkcjUdkNbLEtjjfE2jI3mzG5bx8ddOp j8MVPQn85/mvyCzYoWvA/Qu21e5ZdrK6jtxfGnk0Fx6rrmKiSK7xWUuQhYL+9/xmS6ps Y9lKh0ZETGZWEgAniCDIM8jOWHmUFDTD0VoRF81dBwSVWmAsJpIkBzEwDMHeLzJ4sstI u83RzLwDcWw042ZBWUn57xrExXIUnivvn1UZm1wfwuxMfypLgeS8/gHM6gbe8l89KuPY peoHjeFhQpMOEiIp7bqL5wPWcc2NRyGtC7DQ7Q3bnob2uj8WlQsTlNDmxhTvjYeCkRIp YR6A== 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 d37-v6si14084833pla.40.2018.08.01.01.16.30; Wed, 01 Aug 2018 01:16:45 -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 S2388024AbeHAKAM (ORCPT + 99 others); Wed, 1 Aug 2018 06:00:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36156 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387566AbeHAKAM (ORCPT ); Wed, 1 Aug 2018 06:00:12 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CF11402243B; Wed, 1 Aug 2018 08:15:40 +0000 (UTC) Received: from bistromath.localdomain (ovpn-204-30.brq.redhat.com [10.40.204.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 027232156711; Wed, 1 Aug 2018 08:15:25 +0000 (UTC) Date: Wed, 1 Aug 2018 10:15:37 +0200 From: Sabrina Dubroca To: Cong Wang Cc: Eric Dumazet , syzbot+41f9c04b50ef70c66947@syzkaller.appspotmail.com, christian.brauner@ubuntu.com, David Miller , David Ahern , Florian Westphal , Jiri Benc , Kirill Tkhai , LKML , lucien xin , Linux Kernel Network Developers , syzkaller-bugs@googlegroups.com Subject: Re: KASAN: use-after-free Read in rtnetlink_put_metrics Message-ID: <20180801081537.GA31982@bistromath.localdomain> References: <0000000000004fe2be05724ac084@google.com> <20180731134014.GA32114@bistromath.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 08:15:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 08:15:40 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sd@queasysnail.net' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-07-31, 16:03:13 -0700, Cong Wang wrote: > On Tue, Jul 31, 2018 at 6:41 AM Sabrina Dubroca wrote: > > > > 2018-07-31, 05:41:56 -0700, Eric Dumazet wrote: > > > > > > > > > On 07/31/2018 05:31 AM, syzbot wrote: > > > > Hello, > > > > > > > > syzbot found the following crash on: > > > > > > > > HEAD commit: 61f4b23769f0 netlink: Don't shift with UB on nlk->ngroups > > > > git tree: net > > > > console output: https://syzkaller.appspot.com/x/log.txt?x=14a9de58400000 > > > > kernel config: https://syzkaller.appspot.com/x/.config?x=ffb4428fdc82f93b > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=41f9c04b50ef70c66947 > > > > compiler: gcc (GCC) 8.0.1 20180413 (experimental) > > > > > > > > Unfortunately, I don't have any reproducer for this crash yet. > > [...] > > > > > Probably also caused by : > > > > > > > > > commit df18b50448fab1dff093731dfd0e25e77e1afcd1 > > > Author: Sabrina Dubroca > > > Date: Mon Jul 30 16:23:10 2018 +0200 > > > > > > net/ipv6: fix metrics leak > > > > Yeah, I'm looking into both those reports :/ > > Looks like this commit is completely unnecessary, > fib6_drop_pcpu_from() calls fib6_info_release() > which calls fib6_info_destroy_rcu(), so this metrics > will be released twice... kmemleak disagrees: unreferenced object 0xffff88006b605080 (size 96): comm "ip", pid 433, jiffies 4294889793 (age 74.844s) hex dump (first 32 bytes): 00 00 00 00 f4 01 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000002650e4e2>] ip6_route_info_create+0x770/0x4050 [<000000000a8d4c52>] ip6_route_add+0x18/0x90 [<00000000474d669c>] inet6_rtm_newroute+0xeb/0x100 [<0000000019fb732d>] rtnetlink_rcv_msg+0x3b5/0xb40 [<000000006f891e19>] netlink_rcv_skb+0x137/0x380 [<0000000070451985>] netlink_unicast+0x47f/0x6e0 [<000000004487d656>] netlink_sendmsg+0x7a7/0x10c0 [<0000000089fdf5ae>] sock_sendmsg+0xac/0x160 [<00000000aae19c54>] ___sys_sendmsg+0x6e0/0xbb0 [<00000000a3906352>] __sys_sendmsg+0xdc/0x230 [<00000000c7c8548a>] do_syscall_64+0x15d/0x740 [<000000007dfdad73>] entry_SYSCALL_64_after_hwframe+0x49/0xbe [<000000003adb705a>] 0xffffffffffffffff ip netns add peerA ip link add eth0 netns peerA type veth peer name ethA ip -net peerA link set eth0 up ip -net peerA link set lo up ip -net peerA a a fec0:A::1/64 dev eth0 ip -net peerA route add fec0:B::/64 via fec0:A:: mtu 1300 ip netns exec peerA nc fec0:B::1 1234 ip -net peerA route del fec0:B::/64 ip netns del peerA -- Sabrina