Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp997861imu; Fri, 4 Jan 2019 11:00:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7sKMOT3F3wK7yoCTeefCxNq1rTslr6pMQCKxEHdtOLA1Vv38r7MRJdmSqpxF027TplalW6 X-Received: by 2002:a17:902:27a8:: with SMTP id d37mr52669501plb.182.1546628425799; Fri, 04 Jan 2019 11:00:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546628425; cv=none; d=google.com; s=arc-20160816; b=Rh+tMHzYjP6vSfdEx3mw4CBpzLUa9w9TOkO/zwY/YACsPvDrs4G3ZZR5TCCxuY4uAk 5qTO2McT3dXL4O8TcaansDfofSdc1JouVoQh1nSB6LMtMzBdoIpxEUToxOQNFXdx5MDH vdd2aKll+ntAn0kMGA+97rJrIoSqiw9WK+y/mocynlWZv1di4txz/PFmOGTh5dEeDkmM jNeitLHGgVNz5huAbfHwbHCFyss/9Zv3wTHgCK7SUBvachPFLMzw4SYHJwK5sY7QvVwd 5IcKhOfN+AWwIltVQ/xlQIhdsO9eTfZNTonoOFcirVMma+Nk7kw3f2Ft8zqSHltbjMrq 44cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7QYG9S/Kfch01D+I5FXqsAT0eufkUnswh8c8NdeY/VU=; b=vyghUI14uLdYLNQnAb+FuFnWB/qZT8noQmZ/1naUV0VmlFKRywRyxiYZSITriN0B9g hqA6O1cxVRAfoeOT0GpGmtharNMcEddZRLL66Q0w+ywI5Gc9n1gIQ1kz6xPWwqJ+M0d7 aATD5/G1dOlF/oYsvLrZu0IluunEs4Zh5EEOi0twzPBCC9gYHq7Y4QrvbDnhmPvP4cKI woazlTvXaJOCK7YgnQQPpqe+WlTymfwakkioR6cq+bk8thnuNveCnNVedqNwsdjOtHvL I11gUOGr7X4tksPoFtjN6MXGgGJTZyP9SYlhNvQKG82ivLBDT+wiQyq9ly0AgO0zo2yz KObg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XXEsTWg+; 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 o13si7088487pgp.540.2019.01.04.11.00.10; Fri, 04 Jan 2019 11:00:25 -0800 (PST) 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=XXEsTWg+; 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 S1727863AbfADRY6 (ORCPT + 99 others); Fri, 4 Jan 2019 12:24:58 -0500 Received: from mail-ed1-f52.google.com ([209.85.208.52]:44898 "EHLO mail-ed1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbfADRY5 (ORCPT ); Fri, 4 Jan 2019 12:24:57 -0500 Received: by mail-ed1-f52.google.com with SMTP id y56so32357422edd.11; Fri, 04 Jan 2019 09:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7QYG9S/Kfch01D+I5FXqsAT0eufkUnswh8c8NdeY/VU=; b=XXEsTWg+1JQs3ibpSdos8ihJ2kMXerdCGjxX2cj9GBQOybTQ+C+pksxYgMY9C89rHV uqpA1yrlE9sJ6Hxccgt01N33ahZneNP7yHFjIqCBHeLktoq+GL6WBbeTtUwPpNeFGHXK 00NGJCBLoau7BxVIx4t+gRBWvI5st3+e4dZoHcsXSmJun6j+PoVgfYtYIm9VqGlS45+0 hLMWEwDnczPqo519xP3uVMcqObJ6SNumCMN+XhLjVWTafPhTUYi5DteDN28kRVKWBi+o WbJcjGlguZ6Wmkw4hUvAA7OtF2i49lLDtnBHiQvxKMffjWmsTslztsTjx5NlRsTCo0np 1Prw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7QYG9S/Kfch01D+I5FXqsAT0eufkUnswh8c8NdeY/VU=; b=eiXubFVuLpe6E4dvbSnvUnB3oZqIXdBMafyF8aOnmUZw8+9Jr0xqY5fWqoZiiAf33s tUDkj3MxIenpDmDBTZNvlQDK6C2gdbywpRdQjycgN6cZyJLlPJvY9pO/2QNNb32ojmfr ds0vOynZncVzFrSs3jHe7ma3Fpz4mCMguS9GeOUacxaSugtj/JNHsx8Rak0w8CTlfXI/ i5X90uRUZnkoLQ19nIv30XBcZFAzwJivgFYjoMBvjkCe4ufmW/QjHL9TUytirr88f4GV RSwYeec70FebXa0fjZnxDVQi3GAgkMCZWcDylEvI9VVOru1fLGomglkYNeL7L51ABjPW 3fMw== X-Gm-Message-State: AA+aEWZbvXT6/MjPdh4OMaRFGpQArn9fnmlOFF0j/H0n4DeP7Za0IASV 0+QJMTm6OnkwTtX84IJ3JU/PKWTmvf+vmC6MKgs= X-Received: by 2002:a50:a517:: with SMTP id y23mr47723552edb.219.1546622695016; Fri, 04 Jan 2019 09:24:55 -0800 (PST) MIME-Version: 1.0 References: <000000000000513fb7057e8d7013@google.com> <20190103210743.6518841e@redhat.com> <20190103225404.66b0ec9f@redhat.com> <20190104115435.478b4b4a@redhat.com> <20190104181424.5ad4b1de@redhat.com> In-Reply-To: <20190104181424.5ad4b1de@redhat.com> From: Willem de Bruijn Date: Fri, 4 Jan 2019 12:24:18 -0500 Message-ID: Subject: Re: kernel panic: stack is corrupted in udp4_lib_lookup2 To: Stefano Brivio Cc: Dmitry Vyukov , Eric Dumazet , syzbot , David Miller , Alexey Kuznetsov , linux-kernel , Network Development , syzkaller-bugs , Hideaki YOSHIFUJI Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 4, 2019 at 12:14 PM Stefano Brivio wrote: > > On Fri, 4 Jan 2019 12:05:04 +0100 > Dmitry Vyukov wrote: > > > On Fri, Jan 4, 2019 at 11:54 AM Stefano Brivio wrote: > > > > > > On Fri, 4 Jan 2019 11:32:12 +0100 > > > Dmitry Vyukov wrote: > > > > > > > On Thu, Jan 3, 2019 at 10:54 PM Stefano Brivio wrote: > > > > > > > > > > On Thu, 3 Jan 2019 15:15:06 -0600 > > > > > Willem de Bruijn wrote: > > > > > > > > > > > syzbot generated stack traces with > > > > > > > > > > > > [ 183.517380] udpv6_err+0x46/0x60 > > > > > > [ 183.520739] ? __udp6_lib_err+0x1890/0x1890 > > > > > > [ 183.525054] gue6_err_proto_handler+0x199/0x280 > > > > > > > > > > Where? I can't find that in any logs linked from the dashboard at > > > > > https://syzkaller.appspot.com/bug?extid=4ad25edc7a33e4ab91e0 :( > > > > > > > > Stefano, there are these 4 bugs reported that have similarly looking > > > > reproducers involving udp sockets and that crash modes that looks like > > > > stack corruption/overflow: > > > > > > > > https://syzkaller.appspot.com/bug?extid=14005fa30c9a07192934 > > > > https://syzkaller.appspot.com/bug?extid=d14090007dc9ba5fa9b7 > > > > https://syzkaller.appspot.com/bug?extid=137ed32ec9a6d5b0d5fe > > > > https://syzkaller.appspot.com/bug?id=d5bc3e0c66d200d72216ab343a67c4327e4a3452 > > > > > > > > Are these the same bug as this? > > > > > > Judging from the reproducers for the first three, they seem to be. > > > > OK, then I will mark them as dups of this one. > > syzbot just finished the tests I requested and couldn't reproduce the > first three issues with the fix I posted (fou6: Prevent unbounded > recursion in GUE error handler). Thanks for preparing the fixes so quickly, Stefano. I also noticed one trace that seemingly goes through an ip6erspan tunnel as well as gue6. [ 760.618683] ? __udp6_lib_err+0xcb/0x640 [ 760.622716] ? udplitev6_err+0x46/0x60 [ 760.626573] ? gue6_err+0x105/0x270 [ 760.630170] ? udp_lib_close+0x20/0x20 [ 760.634027] ? ip6erspan_tunnel_xmit+0xdc0/0xdc0 Without knowing the err_handler code too well: is it possible that packets with an intermediate IPIP or other tunnel still bypass the checks (which check for strictly UDP in GUE)?