Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp492252pxa; Tue, 11 Aug 2020 08:02:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuYRyvUa+Lb4X+iI3B9zEdFmL4nOSZB1nI1iND0OlB50aWHr4ijUbtmT4QzK/Z6IlUEO5v X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr26782113edb.217.1597158126956; Tue, 11 Aug 2020 08:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597158126; cv=none; d=google.com; s=arc-20160816; b=zUjFuVqLvsdE0ZIEoRBYzBCa1vmMD4Lr1sGtdwThDOEJ1v/Sl+RttvaTw0NsPEq9yE 4U0zmuWDx9POgrZipY0RXhnyaCrdd4FDUZ/Pu7ObLmYDOqt4M0GiW/Jl4W2EfVh15/Na s4fkItnPEXntEI3/i2bSiy3/fhA1Nva1dB2JBu7wdpsiNpGdTL9BOeen1WcvAFA0AaeR HQFS3miUYDWxI8L3BPDT9Xe/KpEf/clH0f+ZziFlJss3N9aC/bGC2V5nNc8MTtl5M8OG tj6jkW5YU4ad0pf00LDgCKbMNCkrug1RUF8Udc4k9ZrILKRirCr7H9Dx4L5znwIT/+yS YqFg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=jn3G3go0uPIm6/Hv6VYyRGg4+qh3uHywEaZstpdHmqw=; b=Wn7rFACN5yss6yD1A7LU0nYNzAoG8YUqQhwh1p3CBzBXnk8ChRf19kgjKemXQRTj6K aVQVrudF1jsiAzVfRsyY0CVt97pi7SnRckZndH2Z0vExeNxJf0zeIxHmHSVM+rPBg6yX kbC1+afgTButV2yYrIqyhzvZfpvid1QkPKAEa7xQmGgElLtpNveZPkn1L1ufpcksiG8Y Iav5Rcg41r4hppu0hCBKJnSj5lpC3S97MwZCQtQZd4F7yKMw1QuZRsh+3auidMXehrIc CE4aAUxvq7gVP2cUicOUkRqca5vkyh3ct/G332UAgtI4hAtx0KywGYBQ/eo8mkWoAf9q Xa4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=mqJNQ44T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si14358498ejr.262.2020.08.11.08.01.42; Tue, 11 Aug 2020 08:02:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=mqJNQ44T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728860AbgHKO7I (ORCPT + 99 others); Tue, 11 Aug 2020 10:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728801AbgHKO7H (ORCPT ); Tue, 11 Aug 2020 10:59:07 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EDCEC06174A for ; Tue, 11 Aug 2020 07:59:07 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id x6so6828429pgx.12 for ; Tue, 11 Aug 2020 07:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=jn3G3go0uPIm6/Hv6VYyRGg4+qh3uHywEaZstpdHmqw=; b=mqJNQ44TtJ6eSbTsFSka9uUnR9iHP9wmGrDflP72AxbNjpFIg5qmwC5ltvASUfNtrz rDC6jsr3LoS4H07TtLAAgauYI7TM1heqoJRDYDaGE+AyXRYeEzybVaRan7++hxvZ7mYT KA+Z4p6w4Qw0wro9ZMjIjMvclTjLbtsURAej0QvU/9GyU1LmxxZNv2MNF1pDOJwtqNtY aqR7OqiLNyyOerQ9XMJ3181UKcXoJDwRmnI1YszX7GJbQtKlz6YsdGQVOQAFJ5Q88smU ll4MgqqDX3BF1IhsVv9fOUzv3nZUOdSSPUT7sc2l9ZNRDz97dxI1Qtmbx5f7yuDPzVn4 4FJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jn3G3go0uPIm6/Hv6VYyRGg4+qh3uHywEaZstpdHmqw=; b=XmIR1E7wnUiD97ZE5oBRUh6NeEXHll8qXOKsfvlju3IOLJbsi/u4NKt5FjaQ0mitqi 8ny8nnQRiYkCzdAA3wIgQa6mKle9W9a0tvbq+c7Jmt0pcAhKl4Q6CzFH0CZrr4av+taY tLEGSSbm/PUO8AGjfgHxufeIIPj4Xk5wcHH3Vm7L562Jus5ngg40Un0z4tCqMjVwMH4K oPPJTWQweUSs1PH5epmv6fGBinIH39iBcjMMgs+zsQPtN0WmTY2t74fqaetFRI1gcWmF IoE2hYxVDgLDrnD5UKP790G9+tJVz8c7TUfu/N0MiZINthzRZMhSLQURGaS5gu/R5ufQ 2/Ow== X-Gm-Message-State: AOAM531/SlAIu9NmTXpzk4ynLd+cfDj3NZqv2SK67zal0a54EmbAYNJT EutLqsQKWcEYtk38ihz4+9jO9g== X-Received: by 2002:aa7:8431:: with SMTP id q17mr6925533pfn.132.1597157945813; Tue, 11 Aug 2020 07:59:05 -0700 (PDT) Received: from [192.168.1.182] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id z6sm26342004pfg.68.2020.08.11.07.59.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 07:59:05 -0700 (PDT) Subject: Re: memory leak in io_submit_sqes To: syzbot , io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk References: <000000000000f50fb505ac9a72c9@google.com> From: Jens Axboe Message-ID: Date: Tue, 11 Aug 2020 08:59:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <000000000000f50fb505ac9a72c9@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/20 7:57 AM, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: d6efb3ac Merge tag 'tty-5.9-rc1' of git://git.kernel.org/p.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=13cb0762900000 > kernel config: https://syzkaller.appspot.com/x/.config?x=42163327839348a9 > dashboard link: https://syzkaller.appspot.com/bug?extid=a730016dc0bdce4f6ff5 > compiler: gcc (GCC) 10.1.0-syz 20200507 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16e877dc900000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1608291a900000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+a730016dc0bdce4f6ff5@syzkaller.appspotmail.com > > executing program > executing program > executing program > executing program > executing program > BUG: memory leak > unreferenced object 0xffff888124949100 (size 256): > comm "syz-executor808", pid 6480, jiffies 4294949911 (age 33.960s) > hex dump (first 32 bytes): > 00 78 74 2a 81 88 ff ff 00 00 00 00 00 00 00 00 .xt*............ > 90 b0 51 81 ff ff ff ff 00 00 00 00 00 00 00 00 ..Q............. > backtrace: > [<0000000084e46f34>] io_alloc_req fs/io_uring.c:1503 [inline] > [<0000000084e46f34>] io_submit_sqes+0x5dc/0xc00 fs/io_uring.c:6306 > [<000000006d4e19eb>] __do_sys_io_uring_enter+0x582/0x830 fs/io_uring.c:8036 > [<00000000a4116b07>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 > [<0000000067b2aefc>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > BUG: memory leak > unreferenced object 0xffff88811751d200 (size 96): > comm "syz-executor808", pid 6480, jiffies 4294949911 (age 33.960s) > hex dump (first 32 bytes): > 00 78 74 2a 81 88 ff ff 00 00 00 00 00 00 00 00 .xt*............ > 0e 01 00 00 00 00 75 22 00 00 00 00 00 0f 1f 04 ......u"........ > backtrace: > [<00000000073ea2ba>] kmalloc include/linux/slab.h:555 [inline] > [<00000000073ea2ba>] io_arm_poll_handler fs/io_uring.c:4773 [inline] > [<00000000073ea2ba>] __io_queue_sqe+0x445/0x6b0 fs/io_uring.c:5988 > [<000000001551bde0>] io_queue_sqe+0x309/0x550 fs/io_uring.c:6060 > [<000000002dfb908f>] io_submit_sqe fs/io_uring.c:6130 [inline] > [<000000002dfb908f>] io_submit_sqes+0x8b8/0xc00 fs/io_uring.c:6327 > [<000000006d4e19eb>] __do_sys_io_uring_enter+0x582/0x830 fs/io_uring.c:8036 > [<00000000a4116b07>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 > [<0000000067b2aefc>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 This one looks very odd, and I cannot reproduce it. The socket() calls reliably fails for me, and even if I hack it to use 0 for protocol instead of 2, I don't see anything interesting happening here. An IORING_OP_WRITEV is submitted on the socket, which just fails with ENOTCONN. -- Jens Axboe