Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3394509pxb; Mon, 1 Mar 2021 08:57:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxy9Sqew67SEX0gh7raL2nHDVPQQGMZMGBJbxfrZXn7S1or3HbwjO3UGFM1s1X26ZoEGwv4 X-Received: by 2002:aa7:d316:: with SMTP id p22mr13858627edq.107.1614617877159; Mon, 01 Mar 2021 08:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614617877; cv=none; d=google.com; s=arc-20160816; b=pN4PCMg59qMXLVXvd9hk69jFEUUlCw3x45MQJNhRumU588Ujp4CitZvVUdYRoil2FD haSjIyF/YjE1aHp3lywFfv/TwttLUONIXEbV1ucDkKWib3+ZE7BFMpi+UZyJ+EKFz4bG InHIw/DPZeV91Eowc+FEAUlwtbs+AAI2NMTjfVKxJFMnY9jPB5VkOkcwcLaDVg5FtGvw 92PFvEOI85lCw2nqXOuQOy4cj89CDi4aKb/6nSdg8asilvbQSFG0lZj9Qy5b3U8hjlSU RyEm+CPzfbcITQdfYx9VNGOeBgg6nWlZ188ta0JzelzCtNvqG4Vu+NK2KX7u0m6BHaDh xPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nAKyn3bbJ2e2Np3T3RRoME/8+DrtqnaJzTBb2u34x6M=; b=J3NrW+89mtXypjXhlY7BCDXHMWRjOBOK8qjmN6/BKt8AgOynDGc0dKi2bpUiHC2a2x xeqNWNySyeUGVVIb5oWx6QipmN6PTajA3KX/5u5Jgxda41SHNV7PADjWi5SDdzjkH9i0 XYw9833hoYWVoGwGjnOq/GsjuuVy6xK5OA2eaGw3qN5FXbTqi8+Hca+hyG7qu+HLL/E4 lYkJ/3+w1Y8WG33mSmogvgX8diANa78CeIjjG4k8RNw42OS92XXeou5kX052CmNLos0R NuuZBtrsIPWrocPUatRcKJL/wpIrCUeU+3ytkJnnkXiXgCTWg59Ikl09TaVE4Oy77/cv yZ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TMeEpeZT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si11126890edw.240.2021.03.01.08.57.34; Mon, 01 Mar 2021 08:57:57 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=TMeEpeZT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235223AbhCAQ4y (ORCPT + 99 others); Mon, 1 Mar 2021 11:56:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237577AbhCAQWX (ORCPT ); Mon, 1 Mar 2021 11:22:23 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93988C06178B; Mon, 1 Mar 2021 08:21:41 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id o38so11892147pgm.9; Mon, 01 Mar 2021 08:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nAKyn3bbJ2e2Np3T3RRoME/8+DrtqnaJzTBb2u34x6M=; b=TMeEpeZTLo6HRYujk8PBneLGc2y147GZ/ksJNcuMO9S7ibrJNliVkb+UVawC+AV9mD TOigQMYkQMLoLvl4VCfqKjgLGHSIFiFitf0dzhut23N6eADCkbF7Rm6xr2OuismTftil qvvP7lWd1fvH6HFJNla7+hfz60R4CuM2TDIIXkXJWKKI85TP1nprBFKhnk4geUPzvb2y W1LZTAE/jL9qQWZEn6vjodzDlENRjO21LGTVSg04JN6FcKP0f/xv+e8/rscEUqZKF0kF jX2nLkkf1g1Z269WaPpbg3krjLidZNn3qdVeQqD9/GhdAP8oX4pyFdPFu7m2/cFmTDpf BnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nAKyn3bbJ2e2Np3T3RRoME/8+DrtqnaJzTBb2u34x6M=; b=VWcq/DWUBM81q8/arqyMnomKyfrxD0ZmKNFUJs42UOX/b+1IychgPBtbTzVnZkbKFF fcIOc4TalCO9cH1GGKMKzL+bJ4V6sqmAvShc02nrYBALw1glh9LC/ClOwvGII4T6II96 ZidH6Sdt/9z9tLvKIagWp6bvoMldvuqcuRN1fJPNPblN+4jI2bhIk7sxFl3kMGcEFWhw QWhGnK8w17WsclaYp7NLf/1a1TMFHcp4YAiMb8sejWBz+d0ZKDXePX1Gkk9EGT7lHoUz JgDGGdOdJTT43gs4JNV/5cMCrWftGm9l8lMNFBPlSUP098+Osyp0fGpPiQ4Dg/vmS/bb FCfA== X-Gm-Message-State: AOAM533I0ydSBZ0iphtwTzKhP20DgxWZqGqHU0vlTnXy+odRua8QHZtV B5RrlNaecsv7QuUbuWrL6zU= X-Received: by 2002:a63:f913:: with SMTP id h19mr14480486pgi.413.1614615701065; Mon, 01 Mar 2021 08:21:41 -0800 (PST) Received: from nuc10 (104.36.148.139.aurocloud.com. [104.36.148.139]) by smtp.gmail.com with ESMTPSA id p7sm16470671pgg.2.2021.03.01.08.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Mar 2021 08:21:40 -0800 (PST) Date: Mon, 1 Mar 2021 08:21:33 -0800 From: Rustam Kovhaev To: syzbot Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, kafai@fb.com, kpsingh@chromium.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, yhs@fb.com, dvyukov@google.com, gregkh@linuxfoundation.org Subject: Re: memory leak in bpf Message-ID: References: <000000000000911d3905b459824c@google.com> <000000000000e56a2605b616b2d9@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000e56a2605b616b2d9@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 09, 2020 at 10:58:10PM -0800, syzbot wrote: > syzbot has found a reproducer for the following issue on: > > HEAD commit: a68a0262 mm/madvise: remove racy mm ownership check > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11facf17500000 > kernel config: https://syzkaller.appspot.com/x/.config?x=4305fa9ea70c7a9f > dashboard link: https://syzkaller.appspot.com/bug?extid=f3694595248708227d35 > compiler: gcc (GCC) 10.1.0-syz 20200507 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=159a9613500000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11bf7123500000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+f3694595248708227d35@syzkaller.appspotmail.com > > Debian GNU/Linux 9 syzkaller ttyS0 > Warning: Permanently added '10.128.0.9' (ECDSA) to the list of known hosts. > executing program > executing program > executing program > BUG: memory leak > unreferenced object 0xffff88810efccc80 (size 64): > comm "syz-executor334", pid 8460, jiffies 4294945724 (age 13.850s) > hex dump (first 32 bytes): > c0 cb 14 04 00 ea ff ff c0 c2 11 04 00 ea ff ff ................ > c0 56 3f 04 00 ea ff ff 40 18 38 04 00 ea ff ff .V?.....@.8..... > backtrace: > [<0000000036ae98a7>] kmalloc_node include/linux/slab.h:575 [inline] > [<0000000036ae98a7>] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:94 [inline] > [<0000000036ae98a7>] bpf_ringbuf_alloc kernel/bpf/ringbuf.c:135 [inline] > [<0000000036ae98a7>] ringbuf_map_alloc kernel/bpf/ringbuf.c:183 [inline] > [<0000000036ae98a7>] ringbuf_map_alloc+0x1be/0x410 kernel/bpf/ringbuf.c:150 > [<00000000d2cb93ae>] find_and_alloc_map kernel/bpf/syscall.c:122 [inline] > [<00000000d2cb93ae>] map_create kernel/bpf/syscall.c:825 [inline] > [<00000000d2cb93ae>] __do_sys_bpf+0x7d0/0x30a0 kernel/bpf/syscall.c:4381 > [<000000008feaf393>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 > [<00000000e1f53cfd>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > i am pretty sure that this one is a false positive the problem with reproducer is that it does not terminate all of the child processes that it spawns i confirmed that it is a false positive by tracing __fput() and bpf_map_release(), i ran reproducer, got kmemleak report, then i manually killed those running leftover processes from reproducer and then both functions were executed and memory was freed i am marking this one as: #syz invalid